Skip to content

Instantly share code, notes, and snippets.

@dmshvetsov
Last active June 1, 2019 15:29
Show Gist options
  • Select an option

  • Save dmshvetsov/6317604 to your computer and use it in GitHub Desktop.

Select an option

Save dmshvetsov/6317604 to your computer and use it in GitHub Desktop.

Revisions

  1. Dmitry Shvetsov revised this gist Sep 1, 2016. No changes.
  2. @sdmgithub sdmgithub created this gist Aug 23, 2013.
    5 changes: 5 additions & 0 deletions seed.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    json = ActiveSupport::JSON.decode(File.read('db/seeds/countries.json'))

    json.each do |a|
    Country.create!(a['country'], without_protection: true)
    end