1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Updating documentation for Console. Now mentioniing sandbox and including a link to the irb section in the online Pickaxe.

This commit is contained in:
Robby Russell 2009-12-02 13:35:28 +08:00 committed by Pratik
parent 0da0072b01
commit 5a19236fca

View file

@ -163,13 +163,20 @@ Finally, when you're ready to resume execution, you enter "cont"
== Console
You can interact with the domain model by starting the console through <tt>script/console</tt>.
Here you'll have all parts of the application configured, just like it is when the
The console is a ruby shell, which allows you to interact with your application's domain
model. Here you'll have all parts of the application configured, just like it is when the
application is running. You can inspect domain models, change values, and save to the
database. Starting the script without arguments will launch it in the development environment.
Passing an argument will specify a different environment, like <tt>script/console production</tt>.
To reload your controllers and models after launching the console run <tt>reload!</tt>
To start the console, just run <tt>script/console</tt> from the application directory.
Options:
* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications made to the database.
* Passing an environment name as an argument will load the corresponding environment.
Example: <tt>script/console production</tt>.
More information about irb can be found at link:http://www.rubycentral.com/pickaxe/irb.html
== dbconsole