]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/034_create_languages.rb
Use a block to add the language record as rails seems to ignore any
[rails.git] / db / migrate / 034_create_languages.rb
index ca9552d98298f6eafe559f6c581844a5985c5e37..daaf2199190d4c1669415bcf8633843cb5337956 100644 (file)
@@ -10,7 +10,11 @@ class CreateLanguages < ActiveRecord::Migration
 
     add_primary_key :languages, [:code]
 
-    Language.create(:code => 'en', :name => 'English', :translation_available => true)
+    Language.create do |l|
+      l.code = 'en'
+      l.name = 'English'
+      l.translation_available = true
+    end
 
     add_foreign_key :users, [:locale], :languages, [:code]
     add_foreign_key :diary_entries, [:language], :languages, [:code]