Commit Graph

135 Commits

Author SHA1 Message Date
Sharang Dashputre
18504eb78f Use a single term instead of all terms used to describe path and URL helpers together 2019-07-26 23:54:39 +05:30
flocela
9cfdf2b19f
typo change
In Adding More RESTful Actions, Adding Member Routes:
I believe the word 'that' should be added to the sentence, 'Within the block of member routes, each route name specifies the HTTP verb will be recognized.' This results in 'Within the block of member routes, each route name specifies the HTTP verb that will be recognized.'
2019-05-16 10:35:56 -05:00
Shailesh Kalamkar
4a39a8da2f [ci skip] Removed extra hyphens 2019-03-11 19:31:36 +05:30
Prathamesh Sonpatki
3b953d9698
Add example of the output of rails routes --expanded in the routing guide [ci skip]
- Instead of the note at the end, added an example of how the output
  looks by using the expanded switch.
2019-03-11 17:46:30 +05:30
Nathaniel Suchy
d9f1cc05b5 Update links and code examples in the guides to use HTTPS where the host supports it. 2019-03-06 15:21:07 -05:00
Andy Waite
fc54809461 Use consistent hash syntax for routes
[ci skip]
2019-02-01 19:48:35 -05:00
lanzhiheng
60570b9b8a [ci skip] improve doc in Adding Member Routes section of routing chapter. 2019-01-11 08:09:44 +08:00
Gannon McGibbon
7973170893 Add note about symbols vs strings 2018-12-04 13:46:02 -05:00
Mina Slater
f1d647aeff [ci skip] corrects more grammar awkwardness, replacing denylist with restricted list and consistently use permitted 2018-08-22 21:52:17 -05:00
Mina Slater
44da9eb3b9 [ci skip] change all instances of blacklist and whitelist to denylist and allowlist 2018-08-21 21:36:40 -05:00
Ryan Brooks
05bafa7401
[ci skip] Update adding member routes guide to fix inconsistency with the implementation. Closes #33518 2018-08-03 12:40:18 +01:00
Matthew Draper
ec387c6dd9
Merge pull request #33229 from albertoalmagro/albertoalmagro/prefer-rails-command-over-bin-rails
Prefer rails command over bin/rails
2018-07-25 04:10:29 +09:30
Paul McMahon
7b9c19d94b Rails guides are now served over https
http links will be redirected to the https version, but still better to
just directly link to the https version.
2018-07-24 11:29:31 +09:00
Alberto Almagro
40b209db53 Recommend use of rails over bin/rails
As discussed in #33203 rails command already looks for, and runs,
bin/rails if it is present.

We were mixing recommendations within guides and USAGE guidelines,
in some files we recommended using rails, in others bin/rails and
in some cases we even had both options mixed together.
2018-07-06 22:46:35 +02:00
Anthony Crumley
258670244d Added a lot of Oxford commas
[ci skip] A regular expression was used to find a lot of missing Oxford
commas and add them.  The regular expression was as follows.

", ([a-zA-Z0-9.\`:'\"]+ ){1,6}(or|and) "
2018-05-10 12:46:06 -05:00
yuuji.yaginuma
834be61e61 Fix named route parameter example [ci skip]
The prefix of `new` and `edit` generated by `resources` is singular.
2018-05-08 07:27:21 +09:00
Yuta Uchida
fe97612141
Fix output in routing.md [ci skip] 2018-05-07 21:09:59 +09:00
Ryuta Kamizono
11549e815a Partly revert "Use https with weblog URI" [ci skip]
weblog.jamisbuck.org is not GitHub Pages.
2018-05-03 18:32:03 +09:00
Yoshiyuki Hirano
f3c71ff1e1 Use https with weblog URI 2018-05-02 21:06:03 +09:00
simonjamain
1230253153 Adding precision about which letter case to use for controller names … (#32740)
* Adding precision about which letter case to use for controller names in routing

Many people (including myself) encounter an error when having multiple words controller names and trying to put camelCase in their routes
2018-04-27 14:09:54 -04:00
Kasper Timm Hansen
7bede102d2
[ci skip] Add missing do. 2018-03-12 14:55:58 +01:00
Andrew White
6fdc379c19 Add section to routing guide about config/routes.rb [ci skip]
Closes #32219.
2018-03-12 13:42:08 +00:00
Benoit Tigeot
c6d928f3ca Add --expanded option to "rails routes"
When using rails routes with small terminal or complicated routes it can be
very difficult to understand where is the element listed in header. psql
had the same issue, that's why they created "expanded mode" you can
switch using `\x` or by starting psql with
```
-x
--expanded

    Turn on the expanded table formatting mode. This is equivalent to the \x command.
```
The output is similar to one implemented here for rails routes:

db_user-# \du
List of roles
-[ RECORD 1 ]----------------------------------------------
Role name  | super
Attributes | Superuser, Create role, Create DB
Member of  | {}
-[ RECORD 2 ]----------------------------------------------
Role name  | role
Attributes | Superuser, Create role, Create DB, Replication
Member of  | {}
2018-02-28 22:32:34 +01:00
Avneet Singh Malhotra
1439a54236 Correct to option's value of the route in the Bound Parameters section in routing guide. 2018-02-26 19:20:31 +05:30
Yoshiyuki Hirano
3dc774f371 [ci skip] Update routing guide for Direct
* Added the direct method to routing guide.
2017-12-12 14:07:58 +09:00
Mariano Giagante
b1638a8cfa Replaces the 17 for the actual call to params[:id] that would make the code work as intended. [ci skip] 2017-08-06 12:43:57 -03:00
ydakuka
0e523ffc28 Squashed commit of the following:
commit 4a3d295f3011e771cddead80de7497ca15d15c13
Author: Yauheni Dakuka <yauheni.dakuka@gmail.com>
Date:   Fri Jul 28 14:31:35 2017 +0300

    Update routing.md

commit 620a4ce47288e3ef6504290c78f931214968e7e3
Author: Yauheni Dakuka <yauheni.dakuka@gmail.com>
Date:   Fri Jul 28 14:19:29 2017 +0300

    [ci skip] update routing guide
2017-07-28 15:44:10 +03:00
Yauheni Dakuka
bb5f29bfb7 [ci skip] update routing guide 2017-07-28 11:35:09 +03:00
Sean Griffin
9914964514 Merge pull request #27662 from nhorton/patch-1
Fixing  "Adding Member Routes" documentation
2017-07-17 11:42:27 -04:00
Dzianis Dashkevich
04b9d68297
Update routing doc on the get to: option [ci skip] 2017-04-11 18:50:05 +03:00
claudiob
0b4ff7eacf Fix Guides to include #23138 [ci skip]
A long-standing bug has been fixed in Rails 5.1 by @pixeltrix
See https://github.com/rails/rails/blame/5-1-stable/actionpack/CHANGELOG.md#L52-L64

This PR updates the guides accordingly.

Before:
<img width="799" alt="before" src="https://cloud.githubusercontent.com/assets/10076/24809105/4ec7066c-1b73-11e7-98c6-c709c3465306.png">

After:
<img width="799" alt="after" src="https://cloud.githubusercontent.com/assets/10076/24809109/50b21188-1b73-11e7-8a1a-32c3d0ed512a.png">
2017-04-07 09:23:18 -07:00
Jon Moss
b68aae003a Small grammar fix
[ci skip]
2017-03-30 15:57:32 -04:00
Noah Horton
4906d9029e Fixing "Adding Member Routes" documentation
Previously said the helpers were preview_photo_url and preview_photo_path, i.e. action_resource, when in fact they are resource_action.  i.e. photo_preview_path.  Fixed.
2017-01-12 15:22:44 -07:00
Brandon Weaver
6a116bd909 Add note on defaults block option
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.
2016-12-14 17:17:44 -08:00
Will Jordan
8c1fdf679e Remove :action and :controller segments from routing guide
Fixes #26247.
[ci skip]
2016-08-22 17:19:28 +00:00
Jon Moss
578ae253df
Light grammar edits to beginning of Routing guide
[ci skip]
2016-05-18 09:07:01 -04:00
Jon Moss
7c94db1370 Remove incorrect Rack documentation example
`Sprockets` does not respond to the call method, so I changed the
example to use a fake `MyRackApp`.

Closes #22579.

[ci skip]
2016-03-07 12:47:08 -05:00
Vipul A M
ef2a8c2391 - Fixed and removed long arguments to rake routes
- Fixed related documentation and usage all around

Fixes #23561
2016-02-12 14:35:57 +05:30
yuuji.yaginuma
fae1724398 use rails command in routes task
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.
2016-02-03 08:17:25 +09:00
Vipul A M
8a436fdd98 Add options for rake routes task
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]
2016-02-02 00:27:30 +05:30
Fernando Seror
1307c8d0ea Update the exception of format constraint in routes
Per https://github.com/rails/rails/issues/20264
[ci skip]
2016-01-23 19:15:46 -06:00
Gaurav Sharma
352a8892fd use bin/rails default instead of rake commands [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 …`
2016-01-19 23:47:14 +05:30
Dave Powers
6c9a2b5ab6 Fix letter case and grammar in Routing guide 2015-12-22 14:32:03 -05:00
Genadi Samokovarov
c29fbd3c7a ApplicationRecord documentation pass
This is a pass over the documentation which fills the missing gaps of
`ApplicationRecord`.

[ci skip]
2015-12-17 11:56:35 +01:00
Arthur Nogueira Neves
312485f3e8 Merge pull request #22283 from the-undefined/routes-error-singular-resource
[ci skip] add `controller:` argument to routing.md
2015-11-28 12:47:17 -05:00
the-undefined
3fccecb87b [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
```
2015-11-13 14:32:23 +00:00
yui-knk
666e2cc654 [ci skip] Replace "destroy method" with destroy action
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".
2015-10-20 20:24:07 +09:00
tanmay3011
148d1217a1 [ci skip] Change 'an URL' to 'a URL' as URL doesn't have a vowel sound 2015-10-06 23:34:05 +05:30
Thiago Augusto
89c53ece47 Update routing.md 2015-09-22 10:17:43 -03:00
Robin Dupret
f51d142881 Tiny documentation fixes [ci skip] 2015-08-11 15:35:35 +02:00