aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ko <jko170@gmail.com>2010-03-09 16:37:46 -0200
committerJeremy Kemper <jeremy@bitsweat.net>2010-03-09 10:49:36 -0800
commitea4f8ef33f08a69a68f6b95f392e63ea9cc13602 (patch)
tree9bff3cde233ad0c12735a17d6f16ee09ee766c7f
parent9444ac9312470696b6a5d73cd0044329211ec4c6 (diff)
downloadrails-ea4f8ef33f08a69a68f6b95f392e63ea9cc13602.tar.gz
rails-ea4f8ef33f08a69a68f6b95f392e63ea9cc13602.tar.bz2
rails-ea4f8ef33f08a69a68f6b95f392e63ea9cc13602.zip
Reinstate dom_id in controllers.
[#3040 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
-rw-r--r--actionpack/lib/action_controller/base.rb1
-rw-r--r--actionpack/test/controller/base_test.rb8
2 files changed, 9 insertions, 0 deletions
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