diff options
| -rw-r--r-- | db/migrate/20170213135212_add_timestamps_to_some_models.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20170213135212_add_timestamps_to_some_models.rb b/db/migrate/20170213135212_add_timestamps_to_some_models.rb index ba605e4eb..1502975fe 100644 --- a/db/migrate/20170213135212_add_timestamps_to_some_models.rb +++ b/db/migrate/20170213135212_add_timestamps_to_some_models.rb @@ -6,7 +6,7 @@ class AddTimestampsToSomeModels < ActiveRecord::Migration models.each do |table| if !column_exists?(table, :created_at) && column_exists?(table, :creation_time) add_timestamps table - Object.const_get("Chouette::#{table.to_s.classify}").record_class.update_all 'created_at = creation_time' + Object.const_get("Chouette::#{table.to_s.classify}").update_all 'created_at = creation_time' end remove_column table, :creation_time if column_exists?(table, :creation_time) end |
