Bike!Bike! Website!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
282 B

class AddSpanishCityTranslations < ActiveRecord::Migration
def change
City.all.each do |c|
city = c.get_translation(:es)
c.set_column_for_locale(:city, :es, city, 0) unless city.blank? || city == c.get_column_for_locale(:city, :es)
c.save!
end
end
end