Sha256: 5a48ea9c5edf594b7c8dd50d897d58fcfa4873d67429c0b1a877f4c3a4d23a56

Contents?: true

Size: 560 Bytes

Versions: 25

Compression:

Stored size: 560 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

::Country::DEFAULT_OPTIONS.each do |country|
  ::Country.find_or_create_by(name: country)
end

::Fruit::DEFAULT_OPTIONS.each do |fruit|
  ::Fruit.find_or_create_by(name: fruit)
end

::Skill::DEFAULT_OPTIONS.each do |skill|
  ::Skill.find_or_create_by(name: skill)
end

::City::DEFAULT_OPTIONS.each do |country, cities|
  country = ::Country.find_by(name: country)
  country.present? && cities.each do |city|
    country.cities.find_or_create_by(name: city)
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rails_bootstrap_form-0.9.9 demo/db/seeds.rb
rails_bootstrap_form-0.9.8 demo/db/seeds.rb
rails_bootstrap_form-0.9.7 demo/db/seeds.rb
rails_bootstrap_form-0.9.6 demo/db/seeds.rb
rails_bootstrap_form-0.9.5 demo/db/seeds.rb
rails_bootstrap_form-0.9.4 demo/db/seeds.rb
rails_bootstrap_form-0.9.3 demo/db/seeds.rb
rails_bootstrap_form-0.9.2 demo/db/seeds.rb
rails_bootstrap_form-0.9.1 demo/db/seeds.rb
rails_bootstrap_form-0.9.0 demo/db/seeds.rb
rails_bootstrap_form-0.8.3 demo/db/seeds.rb
rails_bootstrap_form-0.8.2 demo/db/seeds.rb
rails_bootstrap_form-0.8.1 demo/db/seeds.rb
rails_bootstrap_form-0.8.0 demo/db/seeds.rb
rails_bootstrap_form-0.7.2 demo/db/seeds.rb
rails_bootstrap_form-0.7.1 demo/db/seeds.rb
rails_bootstrap_form-0.7.0 demo/db/seeds.rb
rails_bootstrap_form-0.6.2 demo/db/seeds.rb
rails_bootstrap_form-0.6.1 demo/db/seeds.rb
rails_bootstrap_form-0.6.0 demo/db/seeds.rb