Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to Rake Task specific classes live? (Rails 3)

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!

like image 535
Mario Zigliotto Avatar asked Jul 25 '11 21:07

Mario Zigliotto


1 Answers

$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.

like image 139
rnicholson Avatar answered Oct 26 '22 01:10

rnicholson