Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

'request_path' method gets clobbered by named routes

#9

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...

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

State: new
Milestone: none
Assigned to: Ian White Ian White

Activity

No comments yet.

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.