--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t9d3gqinFY2hSMDMm8-Z49cQy7cRp4J8Nwgf3mAm4gccg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Tamosus pontik,Thanks for your reply.The model file is created dynamically based on this code.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t9d3gqinFY2hSMDMm8-Z49cQy7cRp4J8Nwgf3mAm4gccg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADKeJyQKcRGM%3Dj3miANP9PqfODZ6fA8x98F8vUfG_QQ1KnEntw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t9d3gqinFY2hSMDMm8-Z49cQy7cRp4J8Nwgf3mAm4gccg%40mail.gmail.com.--
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADKeJyQKcRGM%3Dj3miANP9PqfODZ6fA8x98F8vUfG_QQ1KnEntw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t8QDyZZhv0Z4TANe1Zc7jcR%2BqYsW4iitPxLQz%3DGqXMpKw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t9d3gqinFY2hSMDMm8-Z49cQy7cRp4J8Nwgf3mAm4gccg%40mail.gmail.com.--
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADKeJyQKcRGM%3Dj3miANP9PqfODZ6fA8x98F8vUfG_QQ1KnEntw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
vocabularies = File.read(Rails.root.join('lib', 'seeds', 'words.csv'))
csv = CSV.parse(vocabularies, :headers => true, :encoding => 'ISO-8859-1')
csv.each do |row|
t = Vocabulary.new
t.word_column1 = row[0]
t.word_column2 = row[1]
t.word_column3 = row[2]
t.word_column4 = row[3]
t.word_column5 = row[4]
t.save!
puts "#{t.word_column1}, #{t.word_column2} saved"
end