Skip to content

Conversation

@carlosantoniodasilva
Copy link
Member

This fixes the following scenario:

resources :contacts do
  post 'new', action: 'new', on: :collection, as: :new
end

Where the /new path is not generated because it's considered a canonical
action, part of the normal resource actions:

new_contacts POST   /contacts(.:format)          contacts#new

ActionPack tests are ok (except for 3 failing on master related to latest session changes).
Fixes #2999

…hecking

This fixes the following scenario:

    resources :contacts do
      post 'new', action: 'new', on: :collection, as: :new
    end

Where the /new path is not generated because it's considered a canonical
action, part of the normal resource actions:

    new_contacts POST   /contacts(.:format)          contacts#new

Fixes rails#2999
tenderlove added a commit that referenced this pull request May 4, 2012
…onical-action

Force given path to http methods in mapper to skip canonical action checking
@tenderlove tenderlove merged commit 9ce057d into rails:master May 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot extend resource routes with path called "new"

2 participants