开发者

Rails in which folder should ruby classes go into?

Ra开发者_运维百科ils in which folder should ruby classes go into?

I am reading this guide and I am wondering in which folder the NewsletterJob class should be in.


If you use the lib folder in rails 3, you need to add that to the load path, as rails 3 removed it by default:

# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths += %W(#{config.root}/lib)


You can put them in the lib folder. Or maybe add a folder under app, like jobs and you should get it loaded automatically in your environment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜