Merge pull request #38028 from p8/guides/command-prompt-for-bash

Add missing $ prompt for bash command examples [ci skip]
This commit is contained in:
Rafael França 2019-12-18 17:30:15 -03:00 committed by GitHub
commit 63ec70e700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -30,7 +30,7 @@ and is enabled by default. You can disable it while creating a new application b
passing the `--skip-sprockets` option. passing the `--skip-sprockets` option.
```bash ```bash
rails new appname --skip-sprockets $ rails new appname --skip-sprockets
``` ```
Rails automatically adds the `sass-rails` gem to your `Gemfile`, which is used Rails automatically adds the `sass-rails` gem to your `Gemfile`, which is used

View File

@ -301,7 +301,7 @@ This means that you will be able to generate new controllers and models for this
engine very easily by running commands like this: engine very easily by running commands like this:
```bash ```bash
$ bin/rails g model $ bin/rails generate model
``` ```
Keep in mind, of course, that anything generated with these commands inside of Keep in mind, of course, that anything generated with these commands inside of
@ -581,7 +581,7 @@ The route now exists, but the controller that this route goes to does not. To
create it, run this command from the application root: create it, run this command from the application root:
```bash ```bash
$ rails g controller comments $ rails generate controller comments
``` ```
This will generate the following things: This will generate the following things:
@ -751,14 +751,14 @@ If you would like to run migrations only from one engine, you can do it by
specifying `SCOPE`: specifying `SCOPE`:
```bash ```bash
rails db:migrate SCOPE=blorgh $ rails db:migrate SCOPE=blorgh
``` ```
This may be useful if you want to revert engine's migrations before removing it. This may be useful if you want to revert engine's migrations before removing it.
To revert all migrations from blorgh engine you can run code such as: To revert all migrations from blorgh engine you can run code such as:
```bash ```bash
rails db:migrate SCOPE=blorgh VERSION=0 $ rails db:migrate SCOPE=blorgh VERSION=0
``` ```
### Using a Class Provided by the Application ### Using a Class Provided by the Application
@ -782,7 +782,7 @@ configurable further on). It can be generated using this command inside the
application: application:
```bash ```bash
rails g model user name:string $ rails generate model user name:string
``` ```
The `rails db:migrate` command needs to be run here to ensure that our The `rails db:migrate` command needs to be run here to ensure that our

View File

@ -473,7 +473,7 @@ class_option :scope, type: :string, default: 'read_products'
Now our generator can be invoked as follows: Now our generator can be invoked as follows:
```bash ```bash
rails generate initializer --scope write_products $ rails generate initializer --scope write_products
``` ```
The command line arguments are accessed through the `options` method inside the generator class. e.g: The command line arguments are accessed through the `options` method inside the generator class. e.g: