I want to organize some helpers in subfolders in the helpers 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? }
您只需将其添加到application.rb
文件。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.