Skip to content

fixed issue #2 #28

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

fixed issue #2 #28

wants to merge 3 commits into from

Conversation

rchrzo
Copy link

@rchrzo rchrzo commented Feb 5, 2016

fixed issue #3 as well: all due to a month off-one error in the archives_sidebar.rb, and in the view _content.html.erb. essentially it loops through entry.month and uses %13 to fix the problem

@@ -30,11 +30,11 @@ def parse_request(_contents, _params)
article_counts = Content.find_by_sql(["select count(*) as count, #{date_func} from contents where type='Article' and published = ? and published_at < ? group by year,month order by year desc,month desc limit ? ", true, Time.now, count.to_i])

@archives = article_counts.map do |entry|
month = (entry.month.to_i%12)+1
month = (entry.month.to_i%13)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what %13 does and how it resolves this issue.

@rchrzo
Copy link
Author

rchrzo commented Feb 5, 2016

updated original comment

@rchrzo
Copy link
Author

rchrzo commented Feb 5, 2016

I don't understand what you want me to do.
http://giphy.com/gifs/JIX9t2j0ZTN9S

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.

2 participants