1
0
Fork 0
mirror of https://github.com/pry/pry-rails.git synced 2022-11-09 12:36:03 -05:00

set Rails::Console::IRB instead of ::IRB

This commit is contained in:
Ryan Fitzgerald 2012-02-07 21:21:40 -08:00
parent 86beea6fdb
commit 363c6d65e8

View file

@ -6,19 +6,18 @@ module PryRails
silence_warnings do
begin
require 'pry'
::IRB = Pry
unless defined?(IRB::ExtendCommandBundle)
IRB::ExtendCommandBundle = Module.new
Rails::Console::IRB = Pry
unless defined?(Pry::ExtendCommandBundle)
Pry::ExtendCommandBundle = Module.new
end
if ::Rails::VERSION::MINOR >= 2
require "rails/console/app"
require "rails/console/helpers"
TOPLEVEL_BINDING.eval('self').extend Rails::ConsoleMethods
end
if ::Rails::VERSION::MINOR >= 2
require "rails/console/app"
require "rails/console/helpers"
TOPLEVEL_BINDING.eval('self').extend Rails::ConsoleMethods
end
rescue LoadError
end
end
end
end
end