开发者

Rake task - with additional class

开发者 https://www.devze.com 2023-04-01 01:46 出处:网络
开发者_如何学编程I have my own classes, which I want to use in my rake task. Where to put files with this classes?If the classes are only used by the rake task, I\'d keep them in lib/, just make sure

开发者_如何学编程I have my own classes, which I want to use in my rake task. Where to put files with this classes?


If the classes are only used by the rake task, I'd keep them in lib/, just make sure you are loading the directory by configuring autoload_paths:

# application.rb
config.autoload_paths += %W(#{config.root}/lib)
0

精彩评论

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

关注公众号