Open pupeno opened 14 years ago
FWIW I ran into this today and worked around it by declaring the model with only the original translations in the migration that creates the translation table.
class AddTranslationsForProject < ActiveRecord::Migration
class Project < ActiveRecord::Base
translates :name, :description
end
def self.up
Project.create_translation_table! :name => :string, :description => :text
end
def self.down
Project.drop_translation_table!
end
end
Worked for me! Thanks Robin!
Thanks Robin, adding translates attributes to the migration fixed all issues!
I'm picking a project where there's a model called Project with three translated fields. These fields were translated at different times, so there are two migrations, one for two fields and one for another field. When I try to run the migrations I get a complaint about a missing field, which is in a later migration effectively having me stuck, no able to migrate (without having to change the code in a way that will fail later).