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
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ module AASM
# foo.aasm_state # => nil
#
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