This project is archived and is in readonly mode.
Changeset [8fb9df535e9fcf4c117ffd3254027e0fe2425cb7] by Piotr Sarnacki
September 3rd, 2010 @ 09:59 PM
Modified polymorphic_url to check for model's namespace
This change allows using namespaced models with
polymorphic_url,
in the way that you would use them without namespace.
Let's say that you have Blog::Post model in namespaced Engine.
When you use
polymorphic_path with Blog::Post instances, like in
form_for(@post),
it will look for blog_posts_path named url helper. As we are inside
Blog::Engine,
it's annoying to always use the prefix. With this commit, blog_
prefix will be
removed and posts_path will be called.
http://github.com/rails/rails/commit/8fb9df535e9fcf4c117ffd3254027e...
Committed by Piotr Sarnacki
- M actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
- M railties/test/railties/engine_test.rb
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>