#9 new
Robert Thau

'request_path' method gets clobbered by named routes

Reported by Robert Thau | October 19th, 2010 @ 12:09 AM

Resources_controller defines an internal controller method called
'request_path'. But if you've got a 'map.resources :requests' in your routes.rb file, that defines a named route called 'request_path'.
So, if you've got this situation, the named route winds up clobbering
the internal method, with unpleasant results all around.

One approach to dealing with this situation is to just rename the
internal method 'request_path', to 'path_of_request' (and likewise
for 'nested_request_path'), thereby taking it out of the line of
fire.

FWIW, I've got patch against HEAD that implements this approach
in a cloned repo on github, and will shortly put in a pull request;
I hope that's not jumping the gun...

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

resources_controller is a rails plugin that eases the pain of RESTful controllers.

People watching this ticket

Pages