Module: Permit::Util

Included in:
Base, Permits::Ability
Defined in:
lib/cancan-permits/permit/util.rb

Instance Method Summary collapse

Instance Method Details

#permit_name(clazz) ⇒ Object



3
4
5
# File 'lib/cancan-permits/permit/util.rb', line 3

def permit_name clazz
  clazz.demodulize.gsub(/Permit$/, '').underscore.to_sym      
end