| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Since #5581 added support for resources with custom params we should
not assume that it is :id when using shallow resource routing.
|
|
|
|
|
|
|
| |
The Mapper looks for a :id constraint in the scope to see whether it
should apply a constraint for nested resources. Since #5581 added support
for resource params other than :id, we need to check for a constraint on
the parent resource's param name and not assume it's :id.
|
|
|
|
|
|
|
|
|
| |
This applies to the following helpers:
`button_to`
`button_tag`
`image_submit_tag`
`link_to`
`submit_tag`
|
| |
|
|
|
|
| |
and PartialRenderer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
fixing a misspelling in the documentation
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When someone sends malformed authorization header, like:
Authorization: Token foobar
given token should be just ignored and resource should not be authorized,
instead of raising error. Before this patch controller would return 401 header
only for well formed tokens, like:
Authorization: Token token=foobar
and would return 500 in former case.
|
| | |
|
| |
| |
| |
| |
| |
| | |
When a select tag is created for a field with errors, then the inserted
options will errantly have a <div class="field_with_errors"> wrapping
them.
|
| |
| |
| |
| |
| | |
minitest/spec provides `describe`, so deprecate the rails version and
have people use the superclass version
|
| |
| |
| |
| |
| | |
The extension was removed in 22bc12ec374b8bdeb3818ca0a3eb787dd3ce39d8,
making "test" an alias for minitest's "it".
|
| | |
|
| |
| |
| |
| | |
Follow the consistency defined in dbc43bc.
|
| | |
|
| |
| |
| |
| | |
this is so we can show route output in the development when we get a routing error. Railties can use features of ActionDispatch, but ActionDispatch should not depend on Railties.
|
|/
|
|
| |
If someone receives a routing error, they likely need to view the routes. Rather than making them visit '/rails/info/routes' or run `rake routes` we can give them that information on the page.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
code for asset_tag_helper
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Assuming the type ":touch", Collector.new was calling
send(:touch), which instead of triggering method_missing
and generating a new collector method, actually
invoked the private method `touch` inherited from
Object.
By generating the method for each mime type as it
is registered, the private methods on Object can
never be reached by `send`, because the `Collector`
will have them before `send` is called on it.
To do this, a callback mechanism was added to Mime::Type
This allows someone to add a callback for whenever
a new mime type is registered. The callback then
gets called with the new mime as a parameter.
This is then used in AbstractController::Collector
to generate new collector methods after each mime
is registered.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 9669f6f7883787aa209207cab68b1069636aed9e.
This breaks Sam Ruby's tests for some reason. Revert until we figure it
out.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* master:
Add documentation for inheritance_column method
Use ArgumentError vs. RuntimeError, which is more precise.
CSV fixtures aren't supported by default anymore, update generated test_helper.rb to reflect that
fix quoting for ActiveSupport::Duration instances
Add few information on the field types
Add the options method to action_controller testcase.
|
| | |
| | |
| | |
| | | |
Signed-off-by: François de Metz <francois@stormz.me>
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
instead of deleting keys on every instantiation, create defaults we
actually use. eventually we can pass an environment in to the request,
and create a new req / res object on each call.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
merging cookies is responsibility of the test runner
|
| | |
| | |
| | |
| | |
| | |
| | | |
For some reason, this special logic is only supposed to be executed on
the second request. For now, we'll extend on recycle, but we should
figure out why this functionality can't be run on every request
|
| | |
| | |
| | |
| | |
| | | |
Try to avoid making the controller mutate itself so that we can
eventually make the response async
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
Also fix some wrong formatting.
Related discussion:
https://github.com/rails/rails/commit/ab72040b74f742b6676b2d2a5dd029bfdca25a7a#commitcomment-1525256
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Remove Active Model dependency from Action Pack
|
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
|\ \
| | |
| | | |
Av prepare2
|
| | | |
|