aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/runner/USAGE
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-05-28 22:04:13 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-09-25 21:31:35 +0200
commit6813edc7d926965e5644cd8befaf229a35b9d8ca (patch)
tree05732c004c68475cb6bd5794d87e030096d4d75c /railties/lib/rails/commands/runner/USAGE
parentb724dbbb8b337d84a3ca8380c9dd75d79a44badf (diff)
downloadrails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.gz
rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.bz2
rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.zip
Initial command structure.
Diffstat (limited to 'railties/lib/rails/commands/runner/USAGE')
-rw-r--r--railties/lib/rails/commands/runner/USAGE17
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/runner/USAGE b/railties/lib/rails/commands/runner/USAGE
new file mode 100644
index 0000000000..dc47a35ff3
--- /dev/null
+++ b/railties/lib/rails/commands/runner/USAGE
@@ -0,0 +1,17 @@
+Examples:
+
+Run `puts Rails.env` after loading the app:
+
+ <%= executable %> 'puts Rails.env'
+
+Run the Ruby file located at `path/to/filename.rb` after loading the app:
+
+ <%= executable %> path/to/filename.rb
+
+<% if RbConfig::CONFIG['host_os'] !~ /mswin|mingw/ %>
+You can also use the runner command as a shebang line for your executables:
+
+ #!/usr/bin/env <%= File.expand_path(executable) %>
+
+ Product.all.each { |p| p.price *= 2 ; p.save! }
+<% end %>