From f915133a0832dee35d3585bdaa525e140f9dcacc Mon Sep 17 00:00:00 2001 From: Scott Watermasysk Date: Fri, 27 Jan 2012 11:14:35 -0500 Subject: [PATCH] include Rails::ConsoleMethods --- lib/pry-rails.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pry-rails.rb b/lib/pry-rails.rb index b1d9df1..36c7f6c 100644 --- a/lib/pry-rails.rb +++ b/lib/pry-rails.rb @@ -10,6 +10,11 @@ module PryRails unless defined?(IRB::ExtendCommandBundle) IRB::ExtendCommandBundle = Module.new end + if ::Rails::VERSION::MINOR >= 2 + require "rails/console/app" + require "rails/console/helpers" + Object.send(:include, Rails::ConsoleMethods) + end rescue LoadError end end