I was wondering how you added files to be included in the initialisation of a rails app.
At the moment开发者_StackOverflow I'm keeping a few files in the model folder because I know the are including.
How do you specify any file to be included, I would rather the files are in lib folder.
You can autoload /lib folder by adding this line to config/application.rb:
config.autoload_paths += %W(#{config.root}/lib)
It's probably just commented now.
But if all you need is just some simple app configuring, put it in config/initializers like John said.
Put them in the config/initializers directory.
加载中,请稍侯......
精彩评论