| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
When I was looking for how to default the entire routes file to JSON I could only find the postfix option. It was mentioned on IRC that you could do this with a block as well and I had not found it in the documentation.
|
|
|
|
|
| |
Fixes #26247.
[ci skip]
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
| |
`Sprockets` does not respond to the call method, so I changed the
example to use a fake `MyRackApp`.
Closes #22579.
[ci skip]
|
|
|
|
|
|
| |
- Fixed related documentation and usage all around
Fixes #23561
|
|
|
|
|
| |
For other task has become to use the rails command at doc and test,
I think that routes task also it is better to use the rails command.
|
|
|
|
|
|
|
|
|
|
| |
Add two options: `-c` and `-g`.
`-g` option returns the urls name, verb and path fields that match the pattern.
`-c` option returns the urls for specific controller.
Fixes #18902, and Fixes #20420
[Anton Davydov & Vipul A M]
|
|
|
|
|
| |
Per https://github.com/rails/rails/issues/20264
[ci skip]
|
|
|
| |
I go through the `http://edgeguides.rubyonrails.org/` and found `rake` commands in various files that are in RAILS 5.0 implement by `bin/rails` command. I try to change all that can be directly use `bin/rails …`
|
| |
|
|
|
|
|
|
|
| |
This is a pass over the documentation which fills the missing gaps of
`ApplicationRecord`.
[ci skip]
|
|\
| |
| | |
[ci skip] add `controller:` argument to routing.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Passing a `Symbol` to the `to:` argument for a `get` route requires a `controller` argument to also be defined.
The documentation is missing the `controller:` argument, which leaving out raises a routing exception:
```ruby
get 'profile', to: :show
```
```
$ rake routes
ArgumentError: Missing :controller key on routes definition, please check your routes.
```
Adding the `controller:` argument maps the route correctly:
```ruby
get 'profile', to: :show, controller: 'users'
```
```
$ rake routes
profile GET /profile(.:format) users#show
```
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sure this is `destroy` method of PhotosController, but in this chapter
these methods which mapped by the router are called "action".
For example:
```ruby
get '/patients/:id', to: 'patients#show'
```
is described to dispatch "controller's `show` action".
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
[ci skip] Note that each action maps to a specific CRUD operation
|
| | |
|
|/ |
|
|
|
|
| |
Fixes #21085.
|
|
|
|
|
|
|
|
|
|
|
| |
Add descriptions about `ActiveRecord::Base#to_param` to
* `ActionDispatch::Routing::Base#match`
* Overriding Named Route Parameters (guide)
When passes `:param` to route definision, always `to_param` method of
related model is overridden to constructe an URL by passing these
model instance to named_helper.
|
|
|
|
| |
[Robin Dupret & Shunsuke Aida]
|
| |
|
|
|
|
| |
sudden ending of form looks incomplete and catches [ci skip]
|
|
|
|
|
|
| |
This adds instructions for routing to rack applications with mount instead of match.
I just spent an unreasonable amount of time staring at this, hopefully the next person will save some time. It's possible that the docs should simply advise people to use mount and leave out the match method but I don't know enough about the differences in the two approaches to assert that definitively.
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/4_0_release_notes.md
|
| | |
|
| | |
|
|/
|
| |
On "Controller Namespaces and Routing" section of the "Rails Routing from the Outside In" , the examples are using "AritclesController" as an example of a controller, to show different organizers. But on the line 232, it incorrectly uses "PostsController" instead of "AritclesController".
|
|
|
|
| |
- Changed `IN` to `ON` in all note sentences in guides.
|
|
|
|
| |
References #18148.
|
|\
| |
| | |
[ci skip] Fix typo in rails guide for routing
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
options, and wrapped to 80 chars. [ci skip]
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
References to ``AppName::Application` removed in favour of ``Rails.application``
as generated with a new rails 4.1 app.
[ci skip]
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes #12777
|
| | |
|
| |
| |
| |
| | |
Grammatical tense correction: "There exists two" => "There exist two".
Plurality correction: "can be reused inside others resources" => "can be reused inside other resources".
|