aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/command_line.textile
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2012-03-24 17:17:21 -0500
committerschneems <richard.schneeman@gmail.com>2012-03-24 17:24:22 -0500
commit2314490547e7b864a387d4a71586373036beb35f (patch)
tree746213ff168da3f2a2558ff42366ccdc7d153a53 /guides/source/command_line.textile
parentc12b88695536418f0db33604590d20ff84323ae3 (diff)
downloadrails-2314490547e7b864a387d4a71586373036beb35f.tar.gz
rails-2314490547e7b864a387d4a71586373036beb35f.tar.bz2
rails-2314490547e7b864a387d4a71586373036beb35f.zip
document `-e` argument for rails console
this adds documentation for -e flag which sets the environment of the rails console like the `rails server` command.
Diffstat (limited to 'guides/source/command_line.textile')
-rw-r--r--guides/source/command_line.textile6
1 files changed, 6 insertions, 0 deletions
diff --git a/guides/source/command_line.textile b/guides/source/command_line.textile
index 463c2b172b..858ce47db1 100644
--- a/guides/source/command_line.textile
+++ b/guides/source/command_line.textile
@@ -278,6 +278,12 @@ The +console+ command lets you interact with your Rails application from the com
You can also use the alias "c" to invoke the console: <tt>rails c</tt>.
+You can specify the environment in which the +console+ command should operate using the +-e+ switch.
+
+<shell>
+$ rails console -e staging
+</shell>
+
If you wish to test out some code without changing any data, you can do that by invoking +rails console --sandbox+.
<shell>