| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
By [this commit](https://github.com/rails/rails/commit/0b476de445faf330c58255e2ec3eea0f3a7c1bfc)
`Journey::Route#verb` need not to return verb as regexp.
The returned value is used by inspector, so change it to be a string.
Add inspect_with_multiple_verbs test case to keep the behavior of
inspector correctly.
|
| |
|
|
|
|
|
| |
then we can let the mapping object derive stuff that the Route object
needs.
|
|
|
|
|
| |
now that we aren't doing options manipulations, we can just pass the
mapping object down and read values from it.
|
|
|
|
|
| |
now we don't need to add it to a hash and delete it from the hash later
just to pass it around
|
|
|
|
|
| |
`add_route` needs the AST, so rather than shove it in a hash and delete
later, lets move parsing up the stack so we can pass down later
|
| |
|
|
|
|
| |
Eventually I want to eliminate the FakeSet test class
|
|
|
|
|
| |
I'm going to reimplement this using route objects, so it will be easier
if we just change ast access to go through a method rather than hashes
|
|
|
|
| |
we don't need to keep adding it and deleting if from hashes.
|
| |
|
|
|
|
| |
the caller already has access to `as`, so we can stop passing it around.
|
|
|
|
|
|
| |
the same value that is extracted from the options hash earlier is
returned, so we don't need to pass it in in the first place. The caller
already has the data, so stop passing it around.
|
|
|
|
|
| |
this way we don't have to mutate the options hash so far away from where
the user passed it in
|
|
|
|
|
|
| |
The `anchor` parameter [is overridden](https://github.com/rails/rails/blob/b4b4a611d0eb9aa1c640c5f521c6a43bf2a65bab/actionpack/lib/action_dispatch/routing/mapper.rb#L1528) unless it
is directly passed to `match`, so setting it in a scope must be a
mistake.
|
|
|
|
| |
this reduces the number of times we have to mutate the options hash.
|
|
|
|
| |
This just ensures that `format` is applied to things inside the scope
|
| |
|
|
|
|
|
| |
Eventually we don't want to expose the "options" hash from scope, only
read values from it. Lets start by adding a reader method.
|
| |
|
| |
|
|
|
|
|
|
| |
We're going to try pulling this up further, and check `via` validity
sooner. This way we don't have to do a bunch of processing on `options`
hashes only to find out that the route is incorrect
|
|
|
|
|
| |
this way we don't have to insert / delete it from the options hash so
many times.
|
|
|
|
|
| |
I think we can find the original place where `action` is added to the
options hash now.
|
|
|
|
|
|
| |
we want to try to pull this logic up to where the user actually passed
in "controller" so that it's close to the related call. That way when
we're down the stack, we don't need to wonder "why are we doing this?"
|
| |
|
|
|
|
|
| |
since we pass `as` down, then we won't have to do an insert / delete
dance with the options hash
|
|
|
|
| |
Now we can override how requests are dispatched in the routeset object
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Related with 5e7d6bba79393de0279917f93b82f3b7b176f4b5
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the current router DSL, using the +match+ DSL
method will match all verbs for the path to the
specified endpoint.
In the vast majority of cases, people are
currently using +match+ when they actually mean
+get+. This introduces security implications.
This commit disallows calling +match+ without
an HTTP verb constraint by default. To explicitly
match all verbs, this commit also adds a
:via => :all option to +match+.
Closes #5964
|
| |
|
| |
|
|
|
|
|
|
| |
When format is true, it is mandatory (as opposed to :format => false).
This is currently not possible with resource routes, which automatically
make format optional by default.
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
It seems like in 89c5b9aee7d7db95cec9e5a934c3761872ab107e Aaron actually put the test in action_dispatch folder. However, there's already a `test/dispatch` directory which I think it's more appropriate.
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
|