By default, resources routes are created with :resource/:id. A model defining to_param can make prettier urls by using something more readable than an integer ID, but since the route picks it up as :id you wind up with awkward User.find_by_username(params[:id]) calls. By overriding the key to be used in @request.params you can be more obvious in your intent.
There was an example here that mentioned reload_plugins? but it was deleted. This commit puts another example back.
Reason: This commit changes code that was committed some year and a half ago. The original code is an ordinary predicate that delegates straight to a boolean operator with no further unnecessaru adorments, as clearly explained in #5329. This change also may confuse users who may now believe they can rely now on singletons, while predicates in Rails rely on standard Ruby semantics for boolean values and guarantee no singletons whatsover. This reverts commit 6349791.
Before it was handled by Proc.bind, but since Proc.bind has been deprecated, this is no longer the case and returned handler needs to match rescuer.
rails server takes `-e` as an argument to specify RAILS_ENV, rails console currently does not have the same interface. This commit fixes this disparity so developers can manually specify `RAILS_ENV` or can pass in an environment with a `-e`.
… a particular usecase for this feature (to allow you to use inheritance in ActiveRecord without using the STI table name
…ne side affects