| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
polymorphic_url
|
|
|
|
| |
polymorphic_routes, for example: polymorphic_url([blog, @post])
|
|
|
|
| |
missing use cases
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
A few examples:
url_for Blog::Engine, :posts_path
url_for Blog::Engine, @post
url_for Blog::Engine, :action => "main", :controller => "index"
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
1. use map instead of inject
2. use [].join("_") instead of '<<'. It is a little bit faster for ruby 1.9.2 and x2 faster for ruby 1.8.7. http://gist.github.com/548143
[#5450 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
Signed-off-by: José Valim <jose.valim@gmail.com>
|