• J
    Allow a defining custom member field on resources · 3e67e45d
    Jamie Macey 提交于
    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.
    3e67e45d
mapper.rb 51.5 KB