I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at weston@westonganger.com. Thanks in advance for any leads!

Selectively Seed Data From Seed.yml From Rails Console

Posted by Weston Ganger

I constantly find myself making a major change to a model and wanting to reseed only that models section from the seed.yml file in the rails console.

Open your rails console and run the following commands

seeds = YAML::load_file(Rails.root.join('db', 'seed.yml'))

This will seed only the ‘categories’ section of the seed.yml file

Related External Links:

Article Topic:Software Development - Rails

Date:May 29, 2015

Recommended Posts