Search code examples
ruby-on-railsrubyrakedirectory-structure

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!


Solution

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