mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
fixing tests (providing default column in test tables)
This commit is contained in:
parent
dc8dd2bb87
commit
89622a2413
2 changed files with 4 additions and 2 deletions
|
@ -159,7 +159,7 @@ module AASM
|
|||
# foo.aasm_state # => nil
|
||||
#
|
||||
def aasm_ensure_initial_state
|
||||
send("#{self.class.aasm_column}=", self.aasm_enter_initial_state.to_s) if send(self.class.aasm_column).blank?
|
||||
aasm_enter_initial_state if send(self.class.aasm_column).blank?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
ActiveRecord::Schema.define(:version => 0) do
|
||||
|
||||
%w{gates readers writers transients simples thieves localizer_test_models}.each do |table_name|
|
||||
create_table table_name, :force => true
|
||||
create_table table_name, :force => true do |t|
|
||||
t.string "aasm_state"
|
||||
end
|
||||
end
|
||||
|
||||
create_table "validators", :force => true do |t|
|
||||
|
|
Loading…
Reference in a new issue