I need to figure out how to make a .try variant that does not call respond_to.

This commit is contained in:
Sam 2013-09-12 11:26:59 +10:00
parent bded4b26fa
commit aa26f9b2ad
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ class TopicList
def has_rank_details?
# Only moderators can see rank details
return false unless @current_user.try(:staff?)
return false unless @current_user && @current_user.staff?
# Only show them on 'Hot'
return @filter == :hot