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

Merge pull request #14 from rwfitzge/master

Fix major bug in my last pull
This commit is contained in:
Robin Wenglewski 2012-02-08 17:13:54 -08:00
commit 36993386aa

View file

@ -1,23 +1,26 @@
require "pry-rails/version"
module PryRails
if(defined?(::Rails) and ::Rails::VERSION::MAJOR >= 3)
class Railtie < ::Rails::Railtie
silence_warnings do
begin
require 'pry'
Rails::Console::IRB = Pry
begin
require 'pry'
if (defined?(::Rails::Console) and ::Rails::VERSION::MAJOR >= 3)
class Railtie < ::Rails::Railtie
silence_warnings do
::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
TOPLEVEL_BINDING.eval('self').extend ::Rails::ConsoleMethods
end
rescue LoadError
end
end
end
rescue LoadError
end
end