diff options
author | Robin Houston <robin@lenny.robin> | 2011-06-11 00:52:06 +0100 |
---|---|---|
committer | Robin Houston <robin@lenny.robin> | 2011-06-11 00:52:06 +0100 |
commit | f9ea41f6cbfc191f8bd549531b3e6dd7c964762e (patch) | |
tree | c48ea3d98780ec84d55fb42497b431a2f58b1069 | |
parent | 43c6e709b9826e33f89df92d412c24e17d987772 (diff) |
Save the default translated values for publicbody entities.
-rw-r--r-- | db/migrate/096_create_translation_tables.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/db/migrate/096_create_translation_tables.rb b/db/migrate/096_create_translation_tables.rb index 9d7cc65ad..4b47c11f7 100644 --- a/db/migrate/096_create_translation_tables.rb +++ b/db/migrate/096_create_translation_tables.rb @@ -14,10 +14,11 @@ class CreateTranslationTables < ActiveRecord::Migration publicbody.translated_attributes.each do |a, default| value = publicbody.read_attribute(a) unless value.nil? - publicbody.send(:"#{a}=", publicbody.read_attribute(a)) + publicbody.send(:"#{a}=", value) end end - end + publicbody.save! + end end |