aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2017-06-29 20:25:54 +0300
committerKir Shatrov <shatrov@me.com>2017-06-30 17:29:13 +0300
commitda895edf2e43d8c03089df7042a5bff7ef15fff0 (patch)
treedc0e043678882fb41299c9dd1427fa31fed9e9ab /actionview
parent5fe2a4f929fff7fa725545c47ac0f9372d8c643d (diff)
downloadrails-da895edf2e43d8c03089df7042a5bff7ef15fff0.tar.gz
rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.tar.bz2
rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.zip
Fallback Parameters#to_s to Hash#to_s
Fixes https://github.com/rails/rails/issues/29617
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/template/form_tag_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb
index 084c540139..c13d0c32ae 100644
--- a/actionview/test/template/form_tag_helper_test.rb
+++ b/actionview/test/template/form_tag_helper_test.rb
@@ -345,6 +345,12 @@ class FormTagHelperTest < ActionView::TestCase
assert_dom_equal expected, actual
end
+ def test_text_field_tag_with_ac_parameters
+ actual = text_field_tag "title", ActionController::Parameters.new(key: "value")
+ expected = %(<input id="title" name="title" type="text" value="{&quot;key&quot;=&gt;&quot;value&quot;}" />)
+ assert_dom_equal expected, actual
+ end
+
def test_text_field_tag_size_string
actual = text_field_tag "title", "Hello!", "size" => "75"
expected = %(<input id="title" name="title" size="75" type="text" value="Hello!" />)