Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add singular resource support to polymorphic_path #23545

Closed
wants to merge 1 commit into from

Conversation

maclover7
Copy link
Contributor

A somewhat less invasive redo to #23535. The problem that makes #1769 so
hard to solve, is that polymorphic_path is only provided with an
database object, so this makes it hard to reinvent the routing tree.
This is the best solution I could come up with.

Will update documentation if this is merged.

r? @pixeltrix

A somewhat less invasive redo to rails#23535. The problem that makes rails#1769 so
hard to solve, is that `polymorphic_path` is only provided with an
database object, so this makes it hard to reinvent the routing tree.
This is the best solution I could come up with.
@sgrif
Copy link
Contributor

sgrif commented Feb 11, 2016

This is basically the same as #15725, and has the same problems as it. This adds a major slow down to a hotpath, and as we discussed in that PR, we ultimately decided that this was an uncommon case that these methods aren't meant to handle. This is more of a fundamental design problem in the router itself that eventually needs to be addressed. It's better to avoid bandaids like this until then.

@sgrif sgrif closed this Feb 11, 2016
@maclover7 maclover7 deleted the fix-1769-redux branch February 11, 2016 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants