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

Wiki pages with 0 likes shown on /wiki/liked #2362

Merged
merged 2 commits into from
Feb 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/controllers/wiki_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,9 @@ def popular
def liked
@title = I18n.t('wiki_controller.well_liked_wiki_pages')
@wikis = Node.limit(40)
.order('node.cached_likes DESC')
.where("status = 1 AND nid != 259 AND (type = 'page' OR type = 'tool' OR type = 'place') AND cached_likes > 0")
.order('node.cached_likes DESC')
.where("status = 1 AND nid != 259 AND (type = 'page' OR type = 'tool' OR type = 'place') AND cached_likes >= 0")

Copy link
Member

Choose a reason for hiding this comment

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

Why the extra newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with the styling that I thought was already prevalent in the src code.

Copy link
Member

Choose a reason for hiding this comment

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

I see your point @jsmayo. This seems to be the styling prevalent in some of the methods in that particular controller. The code is correct though and the PR will be merged soon. Thanks!
What do you think, @ryzokuken?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I didn't have any problem in particular with the newline, I was just wondering if it served any purpose. If it makes things easier to read or more consistent, then keep it by all means.

render template: 'wiki/index'
end

Expand Down