Class: Radmin::Authorization::DSLMethods

Inherits:
Object
  • Object
show all
Defined in:
lib/radmin/authorization.rb

Instance Method Summary collapse

Instance Method Details

#role(role_name, &block) ⇒ Object



4
5
6
7
8
9
# File 'lib/radmin/authorization.rb', line 4

def role(role_name, &block)
  #::Authorization.define_method method_name, &block
  #role_name = role_name.to_sym
  Radmin::Authorization.roles[role_name] ||= []
  Radmin::Authorization.roles[role_name] << block
end