February 2012
1 post
Autoloading in Rails 3
Rails 3 by default adds these to the autoload paths:
app/*
vendor/plugins/*/lib
vendor/plugins/*/app/*
In addition, gems, when they are defined as Rails engines/railties, get each directory in app added to the autoload path.
Notable exceptions: Rails does not automatically add its own lib directory or the lib directories of any plugins to the load path.
September 2011
1 post
Asset fallback paths in Rails 3.1
Many things can cause your production asset paths to change. When that happens, your previous assets just stop working at all. Moreover, it seems like it would make sense for the bare asset path (without the md5 postfix) should just point to the most recent version of the asset. This little tidbit should take care of all of that.
Myapp::Application.routes.draw do
match 'assets/:id.:format'...
March 2011
1 post