X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ed68d524de0703685ff15f1ab574c61ec67e2c22..b1cb7bb8191ec2c25edb12d71670cfb883449c98:/db/migrate/031_create_countries.rb diff --git a/db/migrate/031_create_countries.rb b/db/migrate/031_create_countries.rb index e4106f486..cc0627cd2 100644 --- a/db/migrate/031_create_countries.rb +++ b/db/migrate/031_create_countries.rb @@ -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