mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #24765 from ralinchimev/fix-inconsistencies-in-rails-documentation-generate-controller-examples
Fix inconsistent usage of a capital letter in rails generate examples [ci skip]
This commit is contained in:
commit
afc4976cc7
1 changed files with 4 additions and 4 deletions
|
@ -244,11 +244,11 @@ Ruby) which is processed by the request cycle in Rails before being sent to the
|
||||||
user.
|
user.
|
||||||
|
|
||||||
To create a new controller, you will need to run the "controller" generator and
|
To create a new controller, you will need to run the "controller" generator and
|
||||||
tell it you want a controller called "welcome" with an action called "index",
|
tell it you want a controller called "Welcome" with an action called "index",
|
||||||
just like this:
|
just like this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ bin/rails generate controller welcome index
|
$ bin/rails generate controller Welcome index
|
||||||
```
|
```
|
||||||
|
|
||||||
Rails will create several files and a route for you.
|
Rails will create several files and a route for you.
|
||||||
|
@ -327,7 +327,7 @@ end
|
||||||
application to the welcome controller's index action and `get 'welcome/index'`
|
application to the welcome controller's index action and `get 'welcome/index'`
|
||||||
tells Rails to map requests to <http://localhost:3000/welcome/index> to the
|
tells Rails to map requests to <http://localhost:3000/welcome/index> to the
|
||||||
welcome controller's index action. This was created earlier when you ran the
|
welcome controller's index action. This was created earlier when you ran the
|
||||||
controller generator (`bin/rails generate controller welcome index`).
|
controller generator (`bin/rails generate controller Welcome index`).
|
||||||
|
|
||||||
Launch the web server again if you stopped it to generate the controller (`bin/rails
|
Launch the web server again if you stopped it to generate the controller (`bin/rails
|
||||||
server`) and navigate to <http://localhost:3000> in your browser. You'll see the
|
server`) and navigate to <http://localhost:3000> in your browser. You'll see the
|
||||||
|
@ -406,7 +406,7 @@ a controller called `ArticlesController`. You can do this by running this
|
||||||
command:
|
command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ bin/rails generate controller articles
|
$ bin/rails generate controller Articles
|
||||||
```
|
```
|
||||||
|
|
||||||
If you open up the newly generated `app/controllers/articles_controller.rb`
|
If you open up the newly generated `app/controllers/articles_controller.rb`
|
||||||
|
|
Loading…
Reference in a new issue