diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rwxr-xr-x | actionpack/lib/action_controller.rb | 1 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 9 | ||||
-rw-r--r-- | actionpack/test/controller/helper_test.rb | 14 |
4 files changed, 4 insertions, 22 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 37aa537b9f..4f2891577e 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Remove unused ActionController::Base.template_class. Closes #10787 [Pratik] + * Moved template handlers related code from ActionView::Base to ActionView::Template. [Pratik] * Tests for div_for and content_tag_for helpers. Closes #11223 [thechrisoshow] diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 9586426ca1..919fbc6c6a 100755 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -58,7 +58,6 @@ require 'action_controller/request_forgery_protection' require 'action_controller/headers' require 'action_view' -ActionController::Base.template_class = ActionView::Base ActionController::Base.class_eval do include ActionController::Flash diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 0651a08cb9..4b6411df30 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -329,9 +329,6 @@ module ActionController #:nodoc: # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers. cattr_accessor :logger - # Determines which template class should be used by ActionController. - cattr_accessor :template_class - # Turn on +ignore_missing_templates+ if you want to unit test actions without making the associated templates. cattr_accessor :ignore_missing_templates @@ -1122,10 +1119,6 @@ module ActionController #:nodoc: end def initialize_template_class(response) - unless @@template_class - raise "You must assign a template class through ActionController.template_class= before processing a request" - end - response.template = ActionView::Base.new(self.class.view_paths, {}, self) response.template.extend self.class.master_helper_module response.redirected_to = nil @@ -1225,7 +1218,7 @@ module ActionController #:nodoc: end def add_class_variables_to_assigns - %w(view_paths logger template_class ignore_missing_templates).each do |cvar| + %w(view_paths logger ignore_missing_templates).each do |cvar| @assigns[cvar] = self.send(cvar) end end diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 829d715ae4..d18388821b 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -46,22 +46,10 @@ class HelperTest < Test::Unit::TestCase eval("class #{controller_class_name} < TestController; end") @controller_class = self.class.const_get(controller_class_name) - # Generate new template class and assign to controller. - template_class_name = "Test#{@symbol}View" - eval("class #{template_class_name} < ActionView::Base; end") - @template_class = self.class.const_get(template_class_name) - @controller_class.template_class = @template_class - # Set default test helper. self.test_helper = LocalAbcHelper end - - def teardown - # Reset template class. - #ActionController::Base.template_class = ActionView::Base - end - - + def test_deprecated_helper assert_equal expected_helper_methods, missing_methods assert_nothing_raised { @controller_class.helper TestHelper } |