| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
Passing options as the last value in an array doesn't work with form_for.
This reverts commit 61c8a4d926343903593a27080216af7e4ed81268.
|
|
|
|
|
| |
Passing options as the last value in an array doesn't work with form_for.
This reverts commit 6be564c7a087773cb0b51c54396cc190e4f5c983.
|
|
|
|
|
|
|
|
| |
Rather than keep the url options in record_or_hash_or_array, extract it
and reverse merge with options as it may contain important private keys
like `:routing_type`.
Closes #7259
|
|
|
|
|
| |
Generating an URL with an array of records is now able to build a query
string if the last item of the array is a hash.
|
|
|
|
|
|
|
|
| |
ActiveModel is used in ActionPack for ActiveModel::Naming for a few,
mostly optional aspects of ActionPack related to automatically converting
an ActiveModel compliant object into a key for params and routing. It uses
only three methods of ActiveModel (ActiveModel::Naming.route_key,
ActiveModel::Naming.singular_route_key and ActiveModel::Naming.param_key).
|
|
|
|
| |
Correct the use of to_model in polymorphic routing
|
|
|
|
| |
Also correctly indent its example code.
|
| |
|
|
|
|
| |
This brings back the ability to overwrite/extend url generating methods in application heleprs.
|
|
|
| |
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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>
|