diff options
-rw-r--r-- | actionview/lib/action_view/template/html.rb | 4 | ||||
-rw-r--r-- | actionview/lib/action_view/template/text.rb | 4 | ||||
-rw-r--r-- | actionview/test/template/form_helper_test.rb | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/actionview/lib/action_view/template/html.rb b/actionview/lib/action_view/template/html.rb index ddbd2ea36a..0ffae10432 100644 --- a/actionview/lib/action_view/template/html.rb +++ b/actionview/lib/action_view/template/html.rb @@ -14,9 +14,7 @@ module ActionView #:nodoc: "html template" end - def inspect - "html template" - end + alias_method :inspect, :identifier def to_str ERB::Util.h(@string) diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 898593e702..e8d4e18f04 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -14,9 +14,7 @@ module ActionView #:nodoc: "text template" end - def inspect - "text template" - end + alias_method :inspect, :identifier def to_str @string diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index e82905175a..e27586342d 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -1808,7 +1808,7 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, output_buffer end - def test_form_for_with_symbol_object_name + def test_form_for_with_symbol_as form_for(@post, as: "other_name", html: { id: "create-post" }) do |f| concat f.label(:title, class: "post_title") concat f.text_field(:title) |