Module: CanI::HelperMethods

Defined in:
lib/can_i/helper_method.rb

Instance Method Summary collapse

Instance Method Details

#can(action) ⇒ Object



4
5
6
# File 'lib/can_i/helper_method.rb', line 4

def can(action)
  App.delegate.authorization.can action
end

#can?(action) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/can_i/helper_method.rb', line 12

def can?(action) 
  App.delegate.authorization.can? action
end

#cannot(action) ⇒ Object



8
9
10
# File 'lib/can_i/helper_method.rb', line 8

def cannot(action)
  App.delegate.authorization.cannot action
end