diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 6 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers.rb | 4 | ||||
-rw-r--r-- | actionpack/test/template/sanitize_helper_test.rb | 6 |
3 files changed, 5 insertions, 11 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index 9c3960961b..388e043f0b 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -217,8 +217,10 @@ module AbstractController # * <tt>string</tt> - The name of the method that handles the action # * <tt>nil</tt> - No method name could be found. Raise ActionNotFound. def method_for_action(action_name) - if action_method?(action_name) then action_name - elsif respond_to?(:action_missing, true) then "_handle_action_missing" + if action_method?(action_name) + action_name + elsif respond_to?(:action_missing, true) + "_handle_action_missing" end end end diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb index dad50a58a1..269e78a021 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionpack/lib/action_view/helpers.rb @@ -29,10 +29,6 @@ module ActionView #:nodoc: extend ActiveSupport::Concern - included do - extend SanitizeHelper::ClassMethods - end - include ActiveModelHelper include AssetTagHelper include AssetUrlHelper diff --git a/actionpack/test/template/sanitize_helper_test.rb b/actionpack/test/template/sanitize_helper_test.rb index 7626cdf386..12d5260a9d 100644 --- a/actionpack/test/template/sanitize_helper_test.rb +++ b/actionpack/test/template/sanitize_helper_test.rb @@ -17,7 +17,7 @@ class SanitizeHelperTest < ActionView::TestCase end def test_sanitize_form - assert_sanitized "<form action=\"/foo/bar\" method=\"post\"><input></form>", '' + assert_equal '', sanitize("<form action=\"/foo/bar\" method=\"post\"><input></form>") end def test_should_sanitize_illegal_style_properties @@ -48,8 +48,4 @@ class SanitizeHelperTest < ActionView::TestCase def test_sanitize_is_marked_safe assert sanitize("<html><script></script></html>").html_safe? end - - def assert_sanitized(text, expected = nil) - assert_equal((expected || text), sanitize(text)) - end end |