This project is archived and is in readonly mode.
resouces :only => :create broken since :shallow added
Reported by Josh Kalderimis | June 18th, 2010 @ 03:28 PM
Hi guys,
When :shallow was added to the routes a day ago, :only => :create broke and no longer generates a helper method for use in your controllers/views.
Included is a failing test.
I would love to supply a patch, but need a pointer or two on where to look for the real cause of the issue.
Thanks,
Josh
Comments and changes to this ticket
-
Josh Kalderimis June 18th, 2010 @ 03:52 PM
This issue is bigger than just create and includes update and destroy, I have a patch nearly finished which should cover all cases.
-
Josh Kalderimis June 18th, 2010 @ 04:08 PM
Patch supplied with broader tests for :update, :destroy and :create helper methods not being generated when :shallow and :only or :except are used together.
-
Andrew White June 18th, 2010 @ 04:27 PM
Nearly Josh, but you forget the lonely old singleton resource - good catch though.
The attached patch is basically the same as yours - I just aliased collection_name on SingletonResource to member_name.
-
Josh Kalderimis June 18th, 2010 @ 04:33 PM
Hi Andrew,
Thanks for the feedback! :)
Am I able to also get credited in this patch?
Thanks,
Josh
-
Josh Kalderimis June 18th, 2010 @ 04:36 PM
Hi Andrew, (again)
I see that your patch is minus tests for :only => :update and :delete, is your patch a replacement to mine, or are they to be used together?
Thanks
Josh
-
Andrew White June 18th, 2010 @ 04:53 PM
Josh, by all means come up with a new patch with more extensive tests and then your patch can get applied and you'll get the credit.
-
Josh Kalderimis June 18th, 2010 @ 05:28 PM
Updated patch with correction for singular routes and broader test coverage (again) :)
-
Repository June 18th, 2010 @ 10:03 PM
- State changed from new to committed
(from [9d3eeb905341aaad942ceb0e47bd04cced34d031]) fix for :shallow in router not generating helpers for create, update, and destroy actions when :only or :except are used
[#4900 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/9d3eeb905341aaad942ceb0e47bd04...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 4900 resouces :only => :create broken since :shallow added [#4900 state:committed]