diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-06-29 04:00:19 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-06-29 04:00:19 -0700 |
commit | 7cf663707106a0320755770682898ed90439fa6a (patch) | |
tree | 607dc614669cd9e247e167592b2b4facb10fc3f0 /actionview/lib/action_view | |
parent | 396f23234af89fcc92a9509ee3764a60d4f06210 (diff) | |
parent | 53eb9fdd9c546b101b22e1711ed0c3dd3df19197 (diff) | |
download | rails-7cf663707106a0320755770682898ed90439fa6a.tar.gz rails-7cf663707106a0320755770682898ed90439fa6a.tar.bz2 rails-7cf663707106a0320755770682898ed90439fa6a.zip |
Merge pull request #11156 from JonRowe/fix_tags_picking_string_keys_from_non_stringified_options
Fetch value(s) from stringified options in tags that stringify options
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/color_field.rb | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/helpers/tags/datetime_field.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/tags/color_field.rb b/actionview/lib/action_view/helpers/tags/color_field.rb index d8fc797035..bab28352ed 100644 --- a/actionview/lib/action_view/helpers/tags/color_field.rb +++ b/actionview/lib/action_view/helpers/tags/color_field.rb @@ -4,7 +4,7 @@ module ActionView class ColorField < TextField # :nodoc: def render options = @options.stringify_keys - options["value"] = @options.fetch("value") { validate_color_string(value(object)) } + options["value"] = options.fetch("value") { validate_color_string(value(object)) } @options = options super end diff --git a/actionview/lib/action_view/helpers/tags/datetime_field.rb b/actionview/lib/action_view/helpers/tags/datetime_field.rb index 9a2279c611..416d225706 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_field.rb @@ -4,7 +4,7 @@ module ActionView class DatetimeField < TextField # :nodoc: def render options = @options.stringify_keys - options["value"] = @options.fetch("value") { format_date(value(object)) } + options["value"] = options.fetch("value") { format_date(value(object)) } options["min"] = format_date(options["min"]) options["max"] = format_date(options["max"]) @options = options |