]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/031_create_countries.rb
Add "text" to the valid formats
[rails.git] / db / migrate / 031_create_countries.rb
index 3ee4a8d77e2ae20a5cb87cf002c783c1e8d7ef2c..cc0627cd291fdc1b064811748b854015aa755653 100644 (file)
@@ -1,4 +1,4 @@
-require 'lib/migrate'
+require 'migrate'
 require 'rexml/document'
 
 class CreateCountries < ActiveRecord::Migration
@@ -24,9 +24,11 @@ class CreateCountries < ActiveRecord::Migration
         maxlon = ele.get_text("bBoxEast").to_s
         maxlat = ele.get_text("bBoxNorth").to_s
 
-        Country.create(:code => code,
-                       :min_lat => minlat.to_f, :max_lat => maxlat.to_f,
-                       :min_lon => minlon.to_f, :max_lon => maxlon.to_f)
+        Country.create({
+          :code => code,
+          :min_lat => minlat.to_f, :max_lat => maxlat.to_f,
+          :min_lon => minlon.to_f, :max_lon => maxlon.to_f
+        }, :without_protection => true)
       end
     end
   end