mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
check to see if the aasm_column is blank
This commit is contained in:
parent
dc002d4684
commit
e97a930897
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ module AASM
|
||||||
# foo.aasm_state # => nil
|
# foo.aasm_state # => nil
|
||||||
#
|
#
|
||||||
def aasm_ensure_initial_state
|
def aasm_ensure_initial_state
|
||||||
send("#{self.class.aasm_column}=", self.aasm_enter_initial_state.to_s)
|
send("#{self.class.aasm_column}=", self.aasm_enter_initial_state.to_s) if send(self.class.aasm_column).blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue