开发者

What is the fastest, easiest way to get several records into a database using Ruby on Rails?

开发者 https://www.devze.com 2022-12-09 18:37 出处:网络
I\'m new with Ruby on Rails and want to get several records into the SQLite3 database so that I can manipula开发者_开发问答te the data. I am following a lesson, and wonder what is the fastest, most ef

I'm new with Ruby on Rails and want to get several records into the SQLite3 database so that I can manipula开发者_开发问答te the data. I am following a lesson, and wonder what is the fastest, most effective way to get the data into the database, which has four tables (includes one join table)?

Are there any plugins which are good for this?


I use the Faker library and Rail's new seed functionality.


Have you got data already? Is it already in a database? If so the easiest way is to just configure rails to connect to the database.

Other than that you'll want to look into seeding. This railscasts explains the process.

0

精彩评论

暂无评论...
验证码 换一张
取 消