aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaseem Ahmad <talk.to.waseem@gmail.com>2015-02-26 21:35:35 +0530
committerWaseem Ahmad <talk.to.waseem@gmail.com>2015-02-26 21:39:49 +0530
commitc2c844e6009673c0351c137bb293e94c0f3cabea (patch)
tree3e58c9c6348b5461a583463ea8c45466f3c03335
parentb940e9feeaeadf1f743d6d1ffb3c5967599186c9 (diff)
downloadrails-c2c844e6009673c0351c137bb293e94c0f3cabea.tar.gz
rails-c2c844e6009673c0351c137bb293e94c0f3cabea.tar.bz2
rails-c2c844e6009673c0351c137bb293e94c0f3cabea.zip
Section explaining how rails runner accepts code in a ruby file.
[ci skip]
-rw-r--r--guides/source/command_line.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/guides/source/command_line.md b/guides/source/command_line.md
index 19ccdc5488..6f5a6b7957 100644
--- a/guides/source/command_line.md
+++ b/guides/source/command_line.md
@@ -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.