Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use #include? instead of #any?, make it simpler | Akshay Vishnoi | 2014-05-03 | 1 | -1/+1 |
| | |||||
* | passing a nil in the polymorphic array is not supported. remove nils before ↵ | Aaron Patterson | 2014-05-02 | 1 | -0/+4 |
| | | | | you call the method | ||||
* | passing a nil should always raise an ArgumentError | Aaron Patterson | 2014-05-02 | 1 | -1/+0 |
| | |||||
* | only add the optiosn if they are not empty | Aaron Patterson | 2014-05-01 | 1 | -1/+3 |
| | | | | | | I think this is wrong, but it gets the build passing for now. We should always add options, but we need to make more guarantees about how the underlying url helper is called | ||||
* | always pass options to the _url method | Aaron Patterson | 2014-05-01 | 1 | -3/+1 |
| | |||||
* | never merge url options in to the first data hash | Aaron Patterson | 2014-05-01 | 1 | -1/+1 |
| | | | | | if you want options, don't mix them with the first hash, just pass them all in with the second hash | ||||
* | avoid calling extract_record multiple times | Aaron Patterson | 2014-04-30 | 1 | -3/+2 |
| | |||||
* | eliminate conditional when sending the named route method | Aaron Patterson | 2014-04-30 | 1 | -2/+4 |
| | |||||
* | Adding documentation to +polymorphic_url+ | wangjohn | 2013-06-13 | 1 | -0/+13 |
| | | | | | | | concerning the options that it inherits from +url_for+. The way that +polymorhpic_url+ is built allows it to have options like +:anchor+, +:script_name+, etc. but this is currently not documented. | ||||
* | Cleans and removes useless 'Examples' tag [ci skip] | Alvaro Pereyra | 2012-12-01 | 1 | -2/+0 |
| | |||||
* | 1.9 hash syntax changes to docs | AvnerCohen | 2012-10-31 | 1 | -3/+3 |
| | |||||
* | Revert "polymorphic_url with an array generates a query string" | Andrew White | 2012-08-04 | 1 | -4/+1 |
| | | | | | Passing options as the last value in an array doesn't work with form_for. This reverts commit 61c8a4d926343903593a27080216af7e4ed81268. | ||||
* | Revert "Refactor passing url options via array for polymorphic_url" | Andrew White | 2012-08-04 | 1 | -2/+2 |
| | | | | | Passing options as the last value in an array doesn't work with form_for. This reverts commit 6be564c7a087773cb0b51c54396cc190e4f5c983. | ||||
* | Refactor passing url options via array for polymorphic_url | Andrew White | 2012-08-04 | 1 | -2/+2 |
| | | | | | | | | 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 | ||||
* | polymorphic_url with an array generates a query string | Romain Tribes | 2012-08-04 | 1 | -1/+4 |
| | | | | | 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. | ||||
* | Remove ActiveModel dependency from ActionPack | Guillermo Iguaran | 2012-06-30 | 1 | -7/+7 |
| | | | | | | | | 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). | ||||
* | Merge pull request #6588 from nbibler/polymorphic_to_model | José Valim | 2012-06-01 | 1 | -1/+7 |
| | | | | Correct the use of to_model in polymorphic routing | ||||
* | Reword polymorphic routes + mounted engine rdoc | Mark Rushakoff | 2012-04-29 | 1 | -8/+6 |
| | | | | Also correctly indent its example code. | ||||
* | Improve cache on route_key lookup. | José Valim | 2011-12-08 | 1 | -4/+6 |
| | |||||
* | Make polymorphic_url calls go through application helpers again. | thedarkone | 2011-07-25 | 1 | -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 nil | Damien Mathieu | 2011-07-02 | 1 | -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 statement | Aaron Patterson | 2010-12-17 | 1 | -5/+3 |
| | |||||
* | Convert unless/else into if/else. | thedarkone | 2010-09-27 | 1 | -4/+4 |
| | |||||
* | options[:action] is very likely to be nil. | thedarkone | 2010-09-27 | 1 | -1/+1 |
| | |||||
* | Use new ActiveModel::Naming.route_key in polymorphic_routes | Piotr Sarnacki | 2010-09-03 | 1 | -11/+2 |
| | |||||
* | Add short note on using url_for instead of directly calling named route in ↵ | Piotr Sarnacki | 2010-09-03 | 1 | -0/+3 |
| | | | | polymorphic_url | ||||
* | Add possibility to explicitly call engine's routes through ↵ | Piotr Sarnacki | 2010-09-03 | 1 | -1/+20 |
| | | | | polymorphic_routes, for example: polymorphic_url([blog, @post]) | ||||
* | Added more tests for polymorphic_url with namespaced models and implemented ↵ | Piotr Sarnacki | 2010-09-03 | 1 | -5/+10 |
| | | | | missing use cases | ||||
* | Modified polymorphic_url to check for model's namespace | Piotr Sarnacki | 2010-09-03 | 1 | -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 Sarnacki | 2010-09-03 | 1 | -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 conflict | Xavier Noria | 2010-08-31 | 1 | -1/+1 |
|\ | |||||
| * | Expanded routing documentation with current best practices | Joost Baaij | 2010-08-29 | 1 | -1/+1 |
| | | |||||
* | | Micro optimization for build_named_route_call in PolymorphicRoutes: | yury | 2010-08-28 | 1 | -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::Naming | Piotr Sarnacki | 2010-07-21 | 1 | -3/+3 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Moved PolymorphicRoutes to ActionDispatch::Routing | Piotr Sarnacki | 2010-07-20 | 1 | -0/+186 |
Signed-off-by: José Valim <jose.valim@gmail.com> |