From 951b58206255791587e2491435a80cf0ab3b797b Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 1 Feb 2012 08:59:21 +0100 Subject: Allow to set custom console type with Rails.application.config.console= This patch adds ability to set custom console if you want to use something other than IRB. Previously the hack that people used was: silence_warnings do require 'pry' IRB = Pry end which is not the best way to customize things. --- railties/guides/source/configuring.textile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'railties/guides/source') diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 95f93101ab..451235d41d 100644 --- a/railties/guides/source/configuring.textile +++ b/railties/guides/source/configuring.textile @@ -122,6 +122,17 @@ WARNING: Threadsafe operation is incompatible with the normal workings of develo * +config.whiny_nils+ enables or disables warnings when a certain set of methods are invoked on +nil+ and it does not respond to them. Defaults to true in development and test environments. +* +config.console+ allows you to set class that will be used as console you run +rails console+. It's best to run it in +console+ block: + + +console do + # this block is called only when running console, + # so we can safely require pry here + require "pry" + config.console = Pry +end + + h4. Configuring Assets Rails 3.1, by default, is set up to use the +sprockets+ gem to manage assets within an application. This gem concatenates and compresses assets in order to make serving them much less painful. -- cgit v1.2.3