Module: LockedAttributes
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/locked_attributes.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#locked_attributes ⇒ Object
15 16 17 |
# File 'lib/locked_attributes.rb', line 15 def locked_attributes self.class.locked_attributes || [] end |
#validate_locked_attributes ⇒ Object
19 20 21 22 23 |
# File 'lib/locked_attributes.rb', line 19 def validate_locked_attributes for attribute in locked_and_changed_attributes errors.add(attribute, :locked) end end |