Module: Apollo::ActiveRecordInstanceMethods
- Defined in:
- lib/apollo/active_record_instance_methods.rb
Instance Method Summary collapse
- #load_apollo_state ⇒ Object
-
#persist_apollo_state(new_value) ⇒ Object
On transition the new apollo state is immediately saved in the database.
Instance Method Details
#load_apollo_state ⇒ Object
3 4 5 |
# File 'lib/apollo/active_record_instance_methods.rb', line 3 def load_apollo_state read_attribute(self.class.apollo_column) end |
#persist_apollo_state(new_value) ⇒ Object
On transition the new apollo state is immediately saved in the database.
9 10 11 |
# File 'lib/apollo/active_record_instance_methods.rb', line 9 def persist_apollo_state(new_value) update_attribute self.class.apollo_column, new_value end |