ianwhite / resources_controller

resources_controller rails plugin: rc makes RESTful controllers fun
MIT License
79 stars 21 forks source link

Patch to deal with named_route name collisions... #3

Open rst opened 14 years ago

rst commented 14 years ago

Updating my app, I discovered that 'map.resources :requests' breaks recent versions of resources_controller --- this defines a 'request_path' named route, which in turn winds up clobbering resources_controller's internal method by that name.

This is a patch to deal with the issue, by renaming the method to 'path_of_request', which takes it out of the line of fire. Most of it is updating the specs (which all still pass... at least after a 'mkdir tmp' so it could create the sqlite3 test db).

FWIW, this is currently lighthouse ticket #9:

http://ianwhite.lighthouseapp.com/projects/10598/tickets/9-request_path-method-gets-clobbered-by-named-routes