Fix migration to work with mass assignment protection
This commit is contained in:
parent
d9ba72e66f
commit
1cc882b23f
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue