1
0
Fork 0
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:
Travis Tilley 2009-10-20 14:39:29 -04:00
parent dc002d4684
commit e97a930897

View file

@ -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