forked from i-krav/aasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
API
34 lines (23 loc) · 769 Bytes
/
API
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Overwrite method to read the current state. Used to provide another storage mechanism,
different from the standard Rails read_attribute method.
class MyClass
include AASM
def aasm_read_state
# retrieve the current state manually
end
end
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.
class MyClass
include AASM
def aasm_write_state
# 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
# store the current state manually
end
end