diff options
Diffstat (limited to 'db/migrate/20151210191646_move_posts_to_proper_locale.rb')
-rw-r--r-- | db/migrate/20151210191646_move_posts_to_proper_locale.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20151210191646_move_posts_to_proper_locale.rb b/db/migrate/20151210191646_move_posts_to_proper_locale.rb new file mode 100644 index 0000000..faeaf3c --- /dev/null +++ b/db/migrate/20151210191646_move_posts_to_proper_locale.rb @@ -0,0 +1,9 @@ +class MovePostsToProperLocale < ActiveRecord::Migration + def up + Refinery::Blog::Post::Translation.all.each { |tx| tx.locale = "nb"; tx.save! } + end + + def down + Refinery::Blog::Post::Translation.all.each { |tx| tx.locale = "en"; tx.save! } + end +end |