I believe, converting of data to the seed.rb format is not an option?
If so, the easiest way would be to write a rake task to use mysql or
sqlite3 to upload your data. Here's the sample that I put together
quickly: http://gist.github.com/279918 It replaces the standard
db:seed with the SQL-based
Hi Ahmed,
I think you want to create fixtures for your seed data:
http://api.rubyonrails.org/classes/Fixtures.html
Fixtures can even be scoped to an environment so you can have distinct
seed data for Development, Testing and Production. But, recent
versions of Rails use something called seed.rb
On Jan 18, 2:31 am, Ahmed Abdelsalam li...@ruby-forum.com wrote:
Hello,
I'm developing an application, and I want to automatically load seed
data into database. The seed data exists in a SQL file (exported from
MySQL database). I want the application to load such data when I make
db:reset
Aleksey Gureiev wrote:
I believe, converting of data to the seed.rb format is not an option?
If so, the easiest way would be to write a rake task to use mysql or
sqlite3 to upload your data. Here's the sample that I put together
quickly: http://gist.github.com/279918 It replaces the standard
Billee D. wrote:
Hi Ahmed,
I think you want to create fixtures for your seed data:
http://api.rubyonrails.org/classes/Fixtures.html
Fixtures can even be scoped to an environment so you can have distinct
seed data for Development, Testing and Production. But, recent
versions of Rails use
5 matches
Mail list logo