John Kopanas wrote:> A couple questions concerning rakefiles?
>
> 1) Where should I store Rakefile within my rails project? Within the
> task folder? (if not then what is task folder meant for?)
> 2) How do I extend the pre-existing rake tasks? For instance if I
> want to create a "rake db:populate_db" task
> 3) Is active record and the models within my rails project available
> to the rake task by default? If not how do I include them?
Hi John,
1) Rails creates a rakefile for you in the root of your app. If you
just type ''rake'' from your rails app directory it runs all
tests by
default.
2) Create .rake files in that task folder to define new tasks ( see, for
example http://www.bigbold.com/snippets/posts/show/2925 )
3) I would have thought not available by default, but the standard
require mechanism would work (I assume).
On a more general note, you can already populate your db (if you''re
using ActiveRecord migrations) using the standard task "db:migrate".
Alan
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---