http://www.reinteractive.net/posts/116-12-tips-for-the-rails-asset-pipeline
- Every file that is not a Javascript file or CSS file that is in the app/assets folder will be copied by Rails into the public/assets folder when you compile your assets.
- config.assets.compile
- If it is set to "true" (which it is by default in development) then Rails will try to find a Javascript or CSS file by first looking in the public/assets directory and if it can't find it, will hunt through your app/assets folder looking for the file. If it finds it in app/assets it will go ahead and compile on the fly and then serve this asset up.
- require will look for any file that has the same name that is in in your assets load path. Don't know what your assets load path is? Well, fire up Rails console in the environment of your choice and run: Rails.application.config.assets.paths.