aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-26 14:37:12 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-26 14:37:12 -0300
commit28778de2e0bf556af23ac7a0080174dae6e687cc (patch)
tree4b096194fc7f15d64428d714921ff7fa89a3aab6 /guides
parent0b32beadf5b0f5519c7d80fa72dd43358fb2588e (diff)
parentc2c844e6009673c0351c137bb293e94c0f3cabea (diff)
downloadrails-28778de2e0bf556af23ac7a0080174dae6e687cc.tar.gz
rails-28778de2e0bf556af23ac7a0080174dae6e687cc.tar.bz2
rails-28778de2e0bf556af23ac7a0080174dae6e687cc.zip
Merge pull request #19095 from waseem/rails_runner_ruby_file
Section explaining how rails runner accepts code in a ruby file.
Diffstat (limited to 'guides')
-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.