This project is archived and is in readonly mode.
polymorphic_url should allow a symbol in place of a record
-
Michael Koziarski
- Milestone changed from 2.x to 2.3.4
-
José Valim
- Assigned user changed from DHH to José Valim
- Tag changed from patch, ploymorphic to bugmash, patch, ploymorphic
I think tests should be improved. They don't relate with the conditions specified in the subject (where we have nil as argument).
-
Dan Croak
verified patch does not apply on 2-3-stable
-
Elise Huard
patch did not apply on current 2-3-stable nor master.
polymorphic URL have been moved.moved the test, and ran it, which generated an error. Then i applied the fix, which corrected the error. So it seems to work.
Since things moved, i expect it to only run on master. -
Brendon
Is this also why:
form_for @user_session, [:admin, :user_session]
will try to find admin_user_session_nil_class_path?
Seems to only happen when there is no model in the array. I know I can do admin_user_session_path, but I can't see why this can't work also, especially since UserSession in my case isn't an AR model, it's an authlogic model.
-
José Valim
- Assigned user changed from José Valim to Jeremy Kemper
Thanks Brendon for you input, now I can understand the original ticket.
Actually, the extract_namespace logic is duplicated inside build_named_route_call, so I was able to remove all extract_namespace method (including the break hax) and make the test pass. Patch is attached.
-
José Valim
Rebased.
-
José Valim
Rebased for 2-3-stable.
-
Repository
(from [427a7385eb9b784ad4372bf607217b0b7b2ca543]) Make polymorphic_url work with symbols again and refactor it [#1384 polymorphic_url should allow a symbol in place of a record status:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/427a7385eb9b784ad4372bf607217b... -
Repository
(from [7ba80252a5a6bd94c8445347caee663b12c1a526]) Make polymorphic_url work with symbols again and refactor it [#1384 polymorphic_url should allow a symbol in place of a record status:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/7ba80252a5a6bd94c8445347caee66... -
José Valim
- State changed from new to resolved
