开发者

Autoloading files in subfolders to helpers

I want to organize some helpers in subfolders in the helpers开发者_如何学Python directory. I figured adding this in the initializer would do the trick, but not luck:

  config.autoload_paths += Dir["#{RAILS_ROOT}/app/helpers/*"].find_all { |f| File.stat(f).directory? }


You should simply add this to your application.rb file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜