Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #2: Fixes the top month and mismatched month issue #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cloverharvest
Copy link

@cloverharvest cloverharvest commented May 23, 2016

Fixes #2
=>File : lib/archives_sidebar/app/views/archives_sidebar/_content.html.erb

Taking away +1 on line 8 , redirects the user to the articles_month_path that has exact month and not the month ahead (e.g. if user clicks on March, user is brought to March page and not April).

This fix will also pave the way to address the mismatched month issue in,

=> File : lib/archives_sidebar/lib/archives_sidebar.rb

Removing the divisor 12 and +1 on line 33, makes sure that the entry count is exact, avoiding ghost counts and an empty archive month.

Removing the -1 from line 33, that the exact month is generated and not a month behind.

@cloverharvest cloverharvest changed the title Issue #2 : FIxes the top month and mismatched month issue Issue #2 : Fixes the top month and mismatched month issue May 23, 2016
@cloverharvest cloverharvest changed the title Issue #2 : Fixes the top month and mismatched month issue Issue #2 and Issue #3 : Fixes the top month and mismatched month issue May 23, 2016
@cloverharvest cloverharvest changed the title Issue #2 and Issue #3 : Fixes the top month and mismatched month issue Issue #2: Fixes the top month and mismatched month issue May 23, 2016
@nathanallen
Copy link

nathanallen commented May 23, 2016

2 birds with 1 stone. Nice work! 👍

Fixes #2, Fixes #3 <-- See what I did there?
Closes #64

@cloverharvest
Copy link
Author

Yes, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Top Month Always Empty (Archive Sidebar)
2 participants