mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Merge pull request #245 from evadne/multiple_state_machines_per_class
enh(aasm): patches failing and edge cases in supporting multiple AASMs
This commit is contained in:
commit
ef259bfa5e
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ module AASM
|
|||
def aasm_read_state(name=:default)
|
||||
state = send(self.class.aasm(name).attribute_name)
|
||||
if new_record?
|
||||
state.blank? ? aasm.determine_state_name(self.class.aasm(name).initial_state) : state.to_sym
|
||||
state.blank? ? aasm(name).determine_state_name(self.class.aasm(name).initial_state) : state.to_sym
|
||||
else
|
||||
state.blank? ? nil : state.to_sym
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue