agenda-libre-ruby/db/migrate/20170701161358_add_lu_and_t...

13 lines
394 B
Ruby
Raw Normal View History

2017-07-01 19:02:46 +02:00
# Add the new countries Luxembourg and Tunisia
class AddLuAndTn < ActiveRecord::Migration
def self.up
say 'Creates LU and TN regions'
return if Region.exists? name: 'Luxembourg'
2018-09-15 15:05:21 +02:00
2017-07-01 19:02:46 +02:00
[
{ name: 'Luxembourg', code: :LU, url: '//www.agendadulibre.org' },
{ name: 'Tunisie', code: :TN, url: '//www.agendadulibre.org' }
].each { |country| Region.create country }
end
end