Permalink
Browse files

rename norwegian locale when upgrading

  • Loading branch information...
1 parent 8b56ee5 commit 6ac3d72aeda739a00b3a79c536988c4dc92d5dae @Sharagoz committed May 29, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 script/upgrade_v1.rb
View
@@ -357,6 +357,10 @@ def get_locale(site_id)
collection.update({}, { '$unset' => { 'parts' => '1', 'path' => '1', 'layout_id' => '1' } }, { :multi => true })
end
+# Update Norwegian locale from 'no' to 'nb'
+collection = db.collections.detect {|c| c.name == 'locomotive_accounts'}
+collection.update({ 'locale' => 'no' }, { '$set' => {'locale' => 'nb'}}, {:multi => true})
+
# some cleaning
%w(asset_collections liquid_templates delayed_backend_mongoid_jobs).each do |name|
db.drop_collection name

0 comments on commit 6ac3d72

Please sign in to comment.