2013-04-24 08:19:02 -04:00
|
|
|
|
|
|
|
Overwrite method to read the current state. Used to provide another storage mechanism,
|
|
|
|
different from the standard Rails read_attribute method.
|
2013-04-24 06:57:06 -04:00
|
|
|
|
|
|
|
class MyClass
|
|
|
|
include AASM
|
|
|
|
|
|
|
|
def aasm_read_state
|
|
|
|
# retrieve the current state manually
|
|
|
|
end
|
|
|
|
end
|
2013-04-24 07:51:21 -04:00
|
|
|
|
2013-04-24 08:19:02 -04:00
|
|
|
|
|
|
|
Overwrite method to write the current state (and actually persist it). Used to provide
|
|
|
|
another storage mechanism, different from the standard Rails write_attribute method.
|
2013-04-24 07:51:21 -04:00
|
|
|
|
|
|
|
class MyClass
|
|
|
|
include AASM
|
|
|
|
|
|
|
|
def aasm_write_state
|
2013-04-24 08:19:02 -04:00
|
|
|
# store and persist the current state manually
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
Overwrite method to write the current state (without persisting it).
|
|
|
|
|
|
|
|
class MyClass
|
|
|
|
include AASM
|
|
|
|
|
|
|
|
def aasm_write_state_without_persistence
|
2013-04-24 07:51:21 -04:00
|
|
|
# store the current state manually
|
|
|
|
end
|
|
|
|
end
|