Works with Rails 2.3.x and Ruby 1.8.7. Tests pass. Had to copy in to_param, to_query and try method from ActiveSupport 3.2.x.