From 5d9b926e14a855dc6c98d26439ac6fecac660742 Mon Sep 17 00:00:00 2001 From: Jesse Storimer Date: Wed, 18 Aug 2010 22:09:21 -0400 Subject: [PATCH] Ensure that not all helpers are loaded for subclasses of ActionController::Base. [#5348 state:resolved] --- actionpack/lib/action_controller/base.rb | 5 ----- actionpack/test/fixtures/helpers/fun/pdf_helper.rb | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 9dfffce..77bf3fc 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -58,11 +58,6 @@ module ActionController # Rails 2.x compatibility include ActionController::Compatibility - def self.inherited(klass) - super - klass.helper :all - end - ActiveSupport.run_load_hooks(:action_controller, self) end end diff --git a/actionpack/test/fixtures/helpers/fun/pdf_helper.rb b/actionpack/test/fixtures/helpers/fun/pdf_helper.rb index 0171be8..4010573 100644 --- a/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +++ b/actionpack/test/fixtures/helpers/fun/pdf_helper.rb @@ -1,5 +1,9 @@ module Fun module PdfHelper def foobar() 'baz' end + + # The 'real' version of this method is defined in GamesHelper. + # This method should never be called. + def stratego() 'WRONG HELPER' end end end -- 1.7.2.2