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
Fix for issue 3074 #641
Fix for issue 3074 #641
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,7 @@ def fix_time_zone | |
self.time_zone = try if ActiveSupport::TimeZone[try] | ||
end | ||
|
||
def hide_hit_counts | ||
self.try(:hide_all_hit_counts) || self.try(:hide_private_hit_count) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, and you don't really need .try here - you're calling the methods on self, so you know it exists. try is most useful in situations where you're calling a method on an object that may or may not be nil. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi Elz! I was going to make both of the changes you suggested but you've already committed the changes. Should I make them at a later date? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I figured you were probably asleep, and neither of them is critical, so whenever you get a chance! |
||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h2 class="heading"><%= ts("Statistics") %></h2> | ||
<p><%= ts("You currently have no works posted to the archive. If you add some, you'll find information on this page about hits, kudos, comments, bookmarks and downloads of your works.") %></p> | ||
<p><%= ts("Users can also see how many subscribers they have, but not the names of their subscribers or identifying information about other users who have viewed or downloaded their works.") %></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only bit of advice here would be that in Ruby, it's pretty standard for methods that return true or false to end in a question mark, like: def hide_hit_counts? That just makes it a little clearer to someone who's looking at the code that we're checking a value rather than performing an action.