diff options
author | Jamie Macey <jamie@tracefunc.com> | 2012-03-25 21:36:30 -0700 |
---|---|---|
committer | Jamie Macey <jamie@tracefunc.com> | 2012-03-25 21:42:18 -0700 |
commit | 3e67e45dc327631e085cc67aaa6522b44324364c (patch) | |
tree | afe7c2abd8f2c4095dcbf057473271c2e6589151 /actionpack/lib/action_controller/log_subscriber.rb | |
parent | 8954ee650fbaa60a8766999f138557d5c8c12339 (diff) | |
download | rails-3e67e45dc327631e085cc67aaa6522b44324364c.tar.gz rails-3e67e45dc327631e085cc67aaa6522b44324364c.tar.bz2 rails-3e67e45dc327631e085cc67aaa6522b44324364c.zip |
Allow a defining custom member field on resources
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.
Diffstat (limited to 'actionpack/lib/action_controller/log_subscriber.rb')
0 files changed, 0 insertions, 0 deletions