From 1cc882b23f161ade83fb94052fa4a43c0caa16d2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 6 Mar 2012 19:00:49 +0000 Subject: [PATCH] Fix migration to work with mass assignment protection --- db/migrate/031_create_countries.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/db/migrate/031_create_countries.rb b/db/migrate/031_create_countries.rb index 24331d6a8..cc0627cd2 100644 --- a/db/migrate/031_create_countries.rb +++ b/db/migrate/031_create_countries.rb @@ -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 -- 2.43.2