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/CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index c25d4a889e..a5f32d1a2c 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,5 +1,17 @@ ## Rails 4.0.0 (unreleased) ## +* Allow to set class that will be used to run as a console, other than IRB, with `Rails.application.config.console=`. It's best to add it to `console` block. *Piotr Sarnacki* + + Example: + + # it can be added to config/application.rb + console do + # this block is called only when running console, + # so we can safely require pry here + require "pry" + config.console = Pry + end + * Add convenience `hide!` method to Rails generators to hide current generator namespace from showing when running `rails generate`. *Carlos Antonio da Silva* -- cgit v1.2.3