aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-02-01 08:59:21 +0100
committerPiotr Sarnacki <drogus@gmail.com>2012-02-16 20:41:34 +0100
commit951b58206255791587e2491435a80cf0ab3b797b (patch)
tree7f4618f8ebb57a197b187c56ead4f512288815bd /railties/guides
parente09ac7086b88da0b578c5f4851b6a10db8bfc5fb (diff)
downloadrails-951b58206255791587e2491435a80cf0ab3b797b.tar.gz
rails-951b58206255791587e2491435a80cf0ab3b797b.tar.bz2
rails-951b58206255791587e2491435a80cf0ab3b797b.zip
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.
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/configuring.textile11
1 files changed, 11 insertions, 0 deletions
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:
+
+<ruby>
+console do
+ # this block is called only when running console,
+ # so we can safely require pry here
+ require "pry"
+ config.console = Pry
+end
+</ruby>
+
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.