Module: ActiveState::Model
- Defined in:
- lib/active_state/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
Class Method Summary collapse
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state.
22 23 24 |
# File 'lib/active_state/model.rb', line 22 def state @state end |
Class Method Details
.included(mod) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/active_state/model.rb', line 24 def self.included(mod) mod.extend ClassMethods mod.validates_with StateValidator mod.after_initialize :create_state_object mod.before_save :synchronize_state_column end |