I have a non-rails application where I use both rake and activerecord for my db migrations etc.
How could I use seeds?
I created a seeds.rb file, but how to wrap it in a rake method call?
I have a non-rails application where I use both rake and activerecord for my db migrations etc.
How could I use seeds?
I created a seeds.rb file, but how to wrap it in a rake method call?
Just use require_relative 'db/seeds'
if using Ruby 1.9, or require 'db/seeds'
if using Ruby 1.8 inside a rake task. They will be evaluated when you call it.