Sha256: 54d28bafb7fdca710bbb28b13acf18da3881f8d167a13d6b5e7717f1c19acc46
Contents?: true
Size: 423 Bytes
Versions: 11
Compression:
Stored size: 423 Bytes
Contents
require 'active_support/inflector' module CanTango class PermitEngine < Engine module Util def permit_name clazz @name ||= clazz.to_s.demodulize.gsub(/Role/,'').gsub(/Permit$/, '').gsub(/Group/,'').underscore.to_sym end def role @role ||= permit_name(self.class) end def localhost_manager? Permits::Configuration.localhost_manager end end end end
Version data entries
11 entries across 11 versions & 1 rubygems