diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-02-01 08:59:21 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-02-16 20:41:34 +0100 |
commit | 951b58206255791587e2491435a80cf0ab3b797b (patch) | |
tree | 7f4618f8ebb57a197b187c56ead4f512288815bd /railties/CHANGELOG.md | |
parent | e09ac7086b88da0b578c5f4851b6a10db8bfc5fb (diff) | |
download | rails-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/CHANGELOG.md')
-rw-r--r-- | railties/CHANGELOG.md | 12 |
1 files changed, 12 insertions, 0 deletions
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* |