| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
constraints have access
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Merge `:action` from routing scope and assign endpoint if both `:controller`
and `:action` are present. The endpoint assignment only occurs if there is
no `:to` present in the options hash so should only affect routes using the
shorthand syntax (i.e. endpoint is inferred from the the path).
Fixes #9856
Backport of 37b4276
|
| |
|
|
|
| |
Was forgotten in a72dab0.
|
|
|
|
|
|
|
|
|
| |
Backport #9361.
Closes #7554.
This patch determines the `controller#action` directly
in the `match` method when the shorthand syntax is used.
this prevents problems with namespaces and scopes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ruby 1.9 freezes Hash string keys by default so where a route is
defined like this:
get 'search' => 'search'
then the Mapper will derive the action from the key. This blows up
later when the action is added to the parameters hash and the
encoding is forced.
Closes #3429
|
|
|
|
|
|
|
|
| |
Clear url helper methods when routes are reloaded by removing the
methods explicitly rather than just clearing the module because it
didn't work properly and could be the source of a memory leak.
Closes #8488.
|
| |
|
| |
|
|
|
|
| |
See #8160. [ci skip]
|
|
|
|
| |
this is a backport of #8115 to fix #7842
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 61d5d2d8a97fd289b81991cd79dca3112e7ca135.
Conflicts:
actionpack/CHANGELOG.md
REASON: This added a backward incompatible change.
|
|
|
|
| |
resource and resources do no longer modify passed options
|
|
|
|
|
|
| |
Removing to_shorthand to fix #6497
Conflicts:
actionpack/CHANGELOG.md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optional segments with a root scope need to have the leading slash
outside of the parentheses, otherwise the generated url will be empty.
However if the route has non-optional elements then the leading slash
needs to remain inside the parentheses otherwise the generated url
will have two leading slashes, e.g:
Blog::Application.routes.draw do
get '/(:category)', :to => 'posts#index', :as => :root
get '/(:category)/author/:name', :to => 'posts#author', :as => :author
end
$ rake routes
root GET /(:category)(.:format) posts#index
author GET (/:category)/author/:name(.:format) posts#author
This change adds support for optional segments that contain a slash,
allowing support for urls like /page/2 for the root path, e.g:
Blog::Application.routes.draw do
get '/(page/:page)', :to => 'posts#index', :as => :root
end
$ rake routes
root GET /(page/:page)(.:format) posts#index
Fixes #7073
(cherry picked from commit d8745decaf59aad32aa2f09abdba99b8d0e48b31)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A callable object passed as a constraint for a route may access the request
parameters as part of its check. This causes the combined parameters hash
to be cached in the environment hash. If the constraint fails then any subsequent
access of the request parameters will be against that stale hash.
To fix this we delete the cache after every call to `matches?`. This may have a
negative performance impact if the contraint wraps a large number of routes as the
parameters hash is built by merging GET, POST and path parameters.
Fixes #2510.
(cherry picked from commit 56030506563352944fed12a6bb4793bb2462094b)
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #5677
|
| |
|
| |
|
|
|
|
| |
Remove reference to rails_legacy_mapper, which isn't compatible with 3.2...
|
|
|
|
| |
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
|
|
|
|
|
|
| |
`ActionController.force_ssl` redirects http URLs to their https equivalent;
however, when a URL contains a query string, the resulting redirect lacked the
original query string.
|
|
|
|
| |
Fix url_for method's behavior. GH #3684.
|
|
|
|
| |
symbol nodes. Fixes #4585
|
|
|
|
|
|
| |
recognition goes with the earliest match, named routes use the latest match)"
This reverts commit 71d769e3b58cb56b4b1d5143936c65be8b27c490.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you used dynamic constraint like that:
scope :constraint => MyConstraint.new do
mount RackApp => "/foo"
end
routes were not displayed correctly when using `rake routes`.
This commit fixes it. If you want nice display of dynamic
constraints in `rake routes` output, please just override
to_s method in your constraint's class.
|
| |
|
|
|
|
| |
be properly symbolized.
|
| |
|
|
|
|
| |
goes with the earliest match, named routes use the latest match)
|
|
|
| |
`path_names` can only be used for affecting `new` and `edit`
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This reverts commit 3178cc9a80262d3bf7754f3507ef60243b46634f.
|
| | |
|
| |
| |
| |
| | |
This reverts commit 9d725e3df502a07222f35576108eb2df2bd88259.
|
| | |
|
| | |
|
| | |
|
| | |
|