aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Improve cache on route_key lookup.José Valim2011-12-081-4/+6
|
* Make polymorphic_url calls go through application helpers again.thedarkone2011-07-251-8/+1
| | | | This brings back the ability to overwrite/extend url generating methods in application heleprs.
* provide a more explicit message when using url_for with nilDamien Mathieu2011-07-021-1/+3
| | | This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
* dry up case / when statementAaron Patterson2010-12-171-5/+3
|
* Convert unless/else into if/else.thedarkone2010-09-271-4/+4
|
* options[:action] is very likely to be nil.thedarkone2010-09-271-1/+1
|
* Use new ActiveModel::Naming.route_key in polymorphic_routesPiotr Sarnacki2010-09-031-11/+2
|
* Add short note on using url_for instead of directly calling named route in ↵Piotr Sarnacki2010-09-031-0/+3
| | | | polymorphic_url
* Add possibility to explicitly call engine's routes through ↵Piotr Sarnacki2010-09-031-1/+20
| | | | polymorphic_routes, for example: polymorphic_url([blog, @post])
* Added more tests for polymorphic_url with namespaced models and implemented ↵Piotr Sarnacki2010-09-031-5/+10
| | | | missing use cases
* Modified polymorphic_url to check for model's namespacePiotr Sarnacki2010-09-031-0/+4
| | | | | | | | | | | 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.
* Extended url_for to handle specifying which router should be used.Piotr Sarnacki2010-09-031-1/+1
| | | | | | | A few examples: url_for Blog::Engine, :posts_path url_for Blog::Engine, @post url_for Blog::Engine, :action => "main", :controller => "index"
* resolves merge conflictXavier Noria2010-08-311-1/+1
|\
| * Expanded routing documentation with current best practicesJoost Baaij2010-08-291-1/+1
| |
* | Micro optimization for build_named_route_call in PolymorphicRoutes:yury2010-08-281-10/+10
|/ | | | | | | | | 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>
* Moved a few methods from RecordIdentifier to ActiveModel::NamingPiotr Sarnacki2010-07-211-3/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Moved PolymorphicRoutes to ActionDispatch::RoutingPiotr Sarnacki2010-07-201-0/+186
Signed-off-by: José Valim <jose.valim@gmail.com>