method

member

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: Resources
member(&block) public

To add a member route, add a member block into the resource block:

resources :photos do
  member do
    get 'preview'
  end
end

This will recognize /photos/1/preview with GET, and route to the preview action of PhotosController. It will also create the preview_photo_url and preview_photo_path helpers.

Show source
Register or log in to add new notes.