Method: SearchHistoryPolicy#show?
- Defined in:
- app/policies/search_history_policy.rb
#show? ⇒ Boolean
6 7 8 9 10 11 12 13 14 15 |
# File 'app/policies/search_history_policy.rb', line 6 def show? case user.try(:role).try(:name) when 'Administrator' true when 'Librarian' true if record.user == user when 'User' true if record.user == user end end |