]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/031_create_countries.rb
Set size and anchor position for embedded markers
[rails.git] / db / migrate / 031_create_countries.rb
index e4106f486a65f5afc1163dbaa527707491181654..cc0627cd291fdc1b064811748b854015aa755653 100644 (file)
@@ -1,4 +1,5 @@
-require 'lib/migrate'
+require 'migrate'
+require 'rexml/document'
 
 class CreateCountries < ActiveRecord::Migration
   def self.up
@@ -23,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