Can I somehow execute my db/seeds.rb file from my rails app?

后端 未结 2 1050
别那么骄傲
别那么骄傲 2020-12-08 03:56

I am building a demo, and I want to make it very easy for a non-technical person to set up and run the demo. I have built a seeds.rb file with lots of demo data in it. I w

2条回答
  •  一向
    一向 (楼主)
    2020-12-08 04:56

    You can call Rails.application.load_seed. That's all rake db:seed does.

提交回复
热议问题