I need to figure out how to make a .try variant that does not call respond_to.
This commit is contained in:
parent
bded4b26fa
commit
aa26f9b2ad
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue