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.5.3 demo/db/seeds.rb
rails_bootstrap_form-0.5.2 demo/db/seeds.rb
rails_bootstrap_form-0.5.1 demo/db/seeds.rb
rails_bootstrap_form-0.5.0 demo/db/seeds.rb
rails_bootstrap_form-0.4.2 demo/db/seeds.rb