mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Section explaining how rails runner accepts code in a ruby file.
[ci skip]
This commit is contained in:
parent
b940e9feea
commit
c2c844e600
1 changed files with 6 additions and 0 deletions
|
@ -338,6 +338,12 @@ You can specify the environment in which the `runner` command should operate usi
|
|||
$ bin/rails runner -e staging "Model.long_running_method"
|
||||
```
|
||||
|
||||
You can even execute ruby code written in a file with runner.
|
||||
|
||||
```bash
|
||||
$ bin/rails runner lib/code_to_be_run.rb
|
||||
```
|
||||
|
||||
### `rails destroy`
|
||||
|
||||
Think of `destroy` as the opposite of `generate`. It'll figure out what generate did, and undo it.
|
||||
|
|
Loading…
Reference in a new issue