Reputation: 9025
I have a couple classes that are used only by a rake task. I realize that rake tasks normally live @ lib/tasks/whatever.rake but where should i place the supporting classes?
Thank you!
Upvotes: 6
Views: 1487
Reputation: 4588
$RAILS_ROOT/lib
or $RAILS_ROOT/lib/special_task/
would probably be the best as its in the default load path and you can do a simple require 'my_task_helper'
or require 'special_task/helper'
respectively.
Upvotes: 1
Reputation: 40333
Directly inside "lib", if you're loading the Rails environment for the tasks.
You can also make them plugins if there are too many of them.
Upvotes: 1