mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
35afd2c53b
Not all requirements can be expressed in terms of polymorphic url options so add a `route_for` method that allows calling another direct route (or regular named route) which a set of arguments, e.g: resources :buckets direct :recordable do |recording| route_for(:bucket, recording.bucket) end direct :threadable do |threadable| route_for(:recordable, threadable.parent) end This maintains the context of the original caller, e.g. threadable_path(threadable) # => /buckets/1 threadable_url(threadable) # => http://example.com/buckets/1 |
||
---|---|---|
.. | ||
concerns_test.rb | ||
custom_url_helpers_test.rb | ||
inspector_test.rb | ||
ipv6_redirect_test.rb | ||
route_set_test.rb |