lib/tolk/sync.rb in tolk-1.4.00 vs lib/tolk/sync.rb in tolk-1.5.0

- old
+ new

@@ -51,10 +51,10 @@ translation = existing_phrase.translations.primary || primary_locale.translations.build(:phrase_id => existing_phrase.id) translation.text = value if translation.changed? && !translation.new_record? # Set the primary updated flag if the primary translation has changed and it is not a new record. - existing_phrase.translations.update_all({ :primary_updated => true }, Tolk::Translation.arel_table[:locale_id].not_eq(primary_locale.id)) + existing_phrase.translations.where(Tolk::Translation.arel_table[:locale_id].not_eq(primary_locale.id)).update_all({ :primary_updated => true }) end translation.primary = true translation.save! end