An adaptation of seed-fu, to make seeds.rb a bit nicer
The db:seed rake task in Rails is a nice addition and we use it a lot. The trouble is, you end up writing a lot of redundant code to check if records exist and stuff like that. Not very DRY, not very Rails.
Seed-Fu is a nice plugin that works very well, but it replaces the new db:seed rake task, and this solution is far more light-weight. You add another file to your db folder, seeds-helper.rb, and just require it at the top of seeds.rb.
CodeSpaces.com
Code Spaces is an online development and collaboration service that includes: Subversion Hosting, Project Management, Work Items, Forums, and much more.
Links
Categories
Tags
Archives
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009