Class: CanTango::Permit::UserType
- Extended by:
- ClassMethods
- Defined in:
- lib/cantango/permit/user_type.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(ability) ⇒ UserType
constructor
creates the permit.
- #valid? ⇒ Boolean
Methods included from ClassMethods
Methods inherited from Base
#any, #category, #disable!, #disabled?, #modes, #name, #permit_type, #sync_rules!
Methods included from ClassMethods
#finder, #hash_key, #inherited, #modes, #type
Methods included from Helper::Naming
#account_name, #permit_name, #permit_type
Constructor Details
#initialize(ability) ⇒ UserType
creates the permit
13 14 15 |
# File 'lib/cantango/permit/user_type.rb', line 13 def initialize ability super end |
Instance Method Details
#valid? ⇒ Boolean
17 18 19 20 |
# File 'lib/cantango/permit/user_type.rb', line 17 def valid? debug_invalid unless user_type == name user_type == name end |