From ea4f8ef33f08a69a68f6b95f392e63ea9cc13602 Mon Sep 17 00:00:00 2001 From: Justin Ko Date: Tue, 9 Mar 2010 16:37:46 -0200 Subject: Reinstate dom_id in controllers. [#3040 state:committed] Signed-off-by: Santiago Pastorino Signed-off-by: Jeremy Kemper --- actionpack/lib/action_controller/base.rb | 1 + actionpack/test/controller/base_test.rb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index d00afa6d4e..fcd3cb9bd3 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -29,6 +29,7 @@ module ActionController include ActionController::Verification include ActionController::RequestForgeryProtection include ActionController::Streaming + include ActionController::RecordIdentifier include ActionController::HttpAuthentication::Basic::ControllerMethods include ActionController::HttpAuthentication::Digest::ControllerMethods diff --git a/actionpack/test/controller/base_test.rb b/actionpack/test/controller/base_test.rb index 3e9f8ae048..f047e7da30 100644 --- a/actionpack/test/controller/base_test.rb +++ b/actionpack/test/controller/base_test.rb @@ -76,6 +76,9 @@ class UrlOptionsController < ActionController::Base end end +class RecordIdentifierController < ActionController::Base +end + class ControllerClassTests < ActiveSupport::TestCase def test_controller_path assert_equal 'empty', EmptyController.controller_path @@ -102,6 +105,11 @@ class ControllerClassTests < ActiveSupport::TestCase assert_equal [:password], parameters end + + def test_record_identifier + assert_respond_to RecordIdentifierController.new, :dom_id + assert_respond_to RecordIdentifierController.new, :dom_class + end end class ControllerInstanceTests < Test::Unit::TestCase -- cgit v1.2.3