Goro Kuroita wrote:
> If you mean CSV to DB records, you should use fixtures.
> 
> On terminal window.
> rake db:fixtures:load FIXTURES=table_name RAILS_ENV=development
> 
> Change 'table_name' and RAILS_ENV=~ as you like.
> This will import CSV as DB records.

Poppycock.  Fixtures are so broken that they're worth avoiding 
completely (I wish they'd be removed from Rails).  For prepopulating the 
DB, use the DB's native CSV import or something like seed_fu.  For 
dynamic CSV import in the application, fastercsv might be useful.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to