Class: NdlBookPolicy

Inherits:
ApplicationPolicy
  • Object
show all
Defined in:
app/policies/ndl_book_policy.rb

Instance Method Summary collapse

Instance Method Details

#create?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/policies/ndl_book_policy.rb', line 6

def create?
  true if user.try(:has_role?, 'Librarian')
end

#index?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'app/policies/ndl_book_policy.rb', line 2

def index?
  true if user.try(:has_role?, 'Librarian')
end