opened
nhorton
username_0
Previously said the helpers were preview_photo_url and preview_photo_path, i.e. action_resource, when in fact they are resource_action.  i.e. photo_preview_path.  Fixed.

### Summary

Provide a general description of the code changes in your pull
request... were there any bugs you had fixed? If so, mention them. If
these bugs have open GitHub issues, be sure to tag them here as well,
to keep the conversation linked together.

### Other Information

If there's anything else that's important and relevant to your pull
request, mention that information here. This could include
benchmarks, or other information.

If you are updating any of the CHANGELOG files or are asked to update the
CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file.

Finally, if your pull request affects documentation or any non-code
changes, guidelines for those changes are [available
here](http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation)

Thanks for contributing to Rails!
Fixing  "Adding Member Routes" documentation
issue
created
maclover7
username_1
@username_0 are you sure this is the case? I created a small test script [here](https://gist.github.com/username_1/12abd2450df055ce98f8f8a766a51f24), and I'm seeing that the route helper that's created is `preview_photo_url`, not `photo_preview_url ` 😬
comment
created
nhorton
username_0
Wow - OK, I figured it out and it is subtle.  

Works as described in docs:
Rails.application.routes.draw do
  resources :photos do
    member do
      get 'preview'
    end
  end
end

Works as described in docs:
Rails.application.routes.draw do
  resources :photos do
      get 'preview', on: :member
  end
end

DOES NOT work as described in docs:
Rails.application.routes.draw do
  resources :photos do
      get 'preview'
  end
end

Per the guide:  You can leave out the :on option, this will create the same member route except that the resource id value will be available in params[:photo_id] instead of params[:id].

Not true.  It results in transposing the resource name and action name per my change suggestion on the docs.  Not sure if it is better to correct the code or the docs on this one.
comment
created
maclover7
username_1
@username_0 Can we fix the docs now, and then can you open up a separate issue with the possible routes bug? Thanks!
comment