From 0e3dc03ee435871617ee81679df935fa61ad7cf5 Mon Sep 17 00:00:00 2001 From: Manik Juneja Date: Sat, 10 May 2008 12:55:49 +0530 Subject: [PATCH] small changes to README and added info on dbconsole --- railties/README | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/railties/README b/railties/README index b5f4eee..2dc9b98 100644 --- a/railties/README +++ b/railties/README @@ -145,7 +145,10 @@ and also on programming in general. Debugger support is available through the debugger command when you start your Mongrel or Webrick server with --debugger. This means that you can break out of execution at any point -in the code, investigate and change the model, AND then resume execution! Example: +in the code, investigate and change the model, AND then resume execution! +You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug' + +Example: class WeblogController < ActionController::Base def index @@ -183,6 +186,13 @@ Passing an argument will specify a different environment, like script/consol To reload your controllers and models after launching the console run reload! +== dbconsole + +You can go to the command line of your database directly through script/dbconsole. +You would be connected to the database with the database and credentials defined in database.yml. +Starting the script without arguments will connect you to the development database. Passing an +argument will connect you to a different database, like script/dbconsole production. +Currently works for mysql, postgresql and sqlite. == Description of Contents @@ -200,13 +210,13 @@ app/models app/views Holds the template files for the view that should be named like - weblogs/index.erb for the WeblogsController#index action. All views use eRuby + weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby syntax. app/views/layouts Holds the template files for layouts to be used with views. This models the common header/footer method of wrapping views. In your views, define a layout using the - layout :default and create a file named default.erb. Inside default.erb, + layout :default and create a file named default.html.erb. Inside default.html.erb, call <% yield %> to render the view using this layout. app/helpers @@ -243,4 +253,5 @@ test vendor External libraries that the application depends on. Also includes the plugins subdirectory. + If the app has frozen rails, those gems also go here, under vendor/rails/. This directory is in the load path. -- 1.5.5