Module: Permit::Models::RoleExtensions::RoleInstanceMethods
- Defined in:
- lib/models/role.rb
Instance Method Summary (collapse)
-
- (Object) key=(val)
Sets the key for the role with extra processing to convert it from a symbol and downcase it.
- - (Object) resource_requirement protected
Instance Method Details
- (Object) key=(val)
Sets the key for the role with extra processing to convert it from a symbol and downcase it.
48 49 50 |
# File 'lib/models/role.rb', line 48 def key=(val) write_attribute :key, self.class.prepare_key(val) end |
- (Object) resource_requirement (protected)
53 54 55 |
# File 'lib/models/role.rb', line 53 def resource_requirement errors.add(:requires_resource, "cannot be true if authorize_resource is false") if ! && requires_resource? end |