| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
A few examples:
url_for Blog::Engine, :posts_path
url_for Blog::Engine, @post
url_for Blog::Engine, :action => "main", :controller => "index"
|
| |
|
|
|
|
|
|
|
|
|
| |
It's based specifying application's script_name with:
Rails.application.default_url_options = {:script_name => "/foo"}
default_url_options method is delegated to routes. If router
used to generate url differs from the router passed via env
it always overwrites :script_name with this value.
|
|
|
|
|
|
| |
This requires knowledge about original SCRIPT_NAME and
the parent router. It should be pass through the env
as ORIGIAL_SCRIPT_NAME and action_dispatch.parent_routes
|
|
|
|
|
|
|
|
|
|
| |
or not.
This technique is here to allow using routes from Engine in Application
and vice versa. When using Engine routes inside Application it should
generate prefix based on mount point. When using Engine routes inside
Engine it should use env['SCRIPT_NAME']. In any other case it should
generate prefix as env should not be even available.
|
|
|
|
|
|
|
|
| |
autoloading."
Booting a new Rails application does not work after this commit [#5359 state:open]
This reverts commit 38a421b34d0b414564e919f67d339fac067a56e6.
|
|
|
|
|
|
| |
autoloading.
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
work [#5513 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Rails 2.3)
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
behavior in the router.
If you were using symbols before for methods like match/get/post/put/delete, it is likely that this commit will break your routes.
Everything should behave the same if you are using strings, if not, please open up a ticket.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
router. [#5431 state:resolved]
|
|
|
|
|
|
|
|
| |
name and action if the string is a valid ruby method name.
[#5431 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
request object rather than the environment hash. This it to prevent stale parameters in later routing constraints/redirects as only the normal path parameters are set by Rack::Mount.
Also if a constraint proc arity is more than one, pass the symbolized path parameters
as the first argument to match redirect proc args and provide easier access.
[#5157 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
|
|
|
|
| |
Extend assert_recognizes and assert_generates to support passing
full urls as the path argument. This allows testing of routing
constraints such as subdomain and host within functional tests.
[#5005 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
| |
ensure that request.scheme returns https when using a reverse proxy.
[#5408 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
into the scope [#5208 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
parameter allows slashes [#5409 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
|
| |
|
|
|
|
| |
per the RFC, extracts common test pattern into a test macro, adds a test to cover the :status option
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
OrderedHash) this way we keep the properties of the options passed as an argument
|
|
|
|
|
|
| |
assert_routing to fail. [#5135 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>
|
|
|
|
| |
action_dispatch vendor
|
|
|
|
|
|
| |
blank
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
controller is given to to.
|
|
|
|
|
|
|
|
|
|
|
| |
constraint that allow matching on multiple path segments.
Using a namespace block isn't compatible with dynamic routes so we
raise an ArgumentError if we detect a :module present in the scope.
[#5052 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
1. Don't inherit when specified as an option on a resource
2. Don't push into scope when specified as an option on a resource
2. Resources pull in :only or :except options from scope
3. Either :only or :except in nested scope overwrites parent scope
[#5048 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
| |
The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children.
By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
|
|
|
|
|
|
| |
responsible for controlling how they are named. All other options passed to resources are pushed out to the scope.
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f7ba614c2db improved the internal consistency of the different
means of accessing routes, but it introduced some problems at the level
of code comments and user-visible strings.
This commit applies fixes on three levels:
Firstly, we remove or replace grammatically invalid constructs such as
"a routes" or "a particular routes".
Secondly, we make sure that we always use "the router DSL" or "the
router syntax", because this has always been the official terminology.
Finally, we make sure that we only use "routes" when referring to the
application-specific set of routes that are defined in the
"config/routes.rb" file, we use "router" when referring on a more
abstract level to "the code in Rails used to handle routing", and we use
"routing" when we need an adjective to apply to nouns such as
"url_helpers. Again this is consistent with historical practice and
other places in the documentation.
Note that this is not a sweep over the entire codebase to ensure
consistent usage of language; it is just a revision of the changes
introduced in commit f7ba614c2db.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|