aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/date_helper.rb
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2016-06-25 10:57:57 +0800
committerGitHub <noreply@github.com>2016-06-25 10:57:57 +0800
commita4acb4da6ed3df6b583c58dc28ac729a2f5d75c1 (patch)
tree9641e7e479bd38f471efdd2f80c0bfdc0a5be83b /actionview/lib/action_view/helpers/date_helper.rb
parent40bf7a52d51498879d9b442663b7a23f37fb1204 (diff)
parent3cf2a7184bccfb15945980d52da9666ff05c5dfd (diff)
downloadrails-a4acb4da6ed3df6b583c58dc28ac729a2f5d75c1.tar.gz
rails-a4acb4da6ed3df6b583c58dc28ac729a2f5d75c1.tar.bz2
rails-a4acb4da6ed3df6b583c58dc28ac729a2f5d75c1.zip
Merge pull request #25287 from marekkirejczyk/fix_25267
Make select_year work with include_position: true option, fix #25267
Diffstat (limited to 'actionview/lib/action_view/helpers/date_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/date_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb
index 04dcf01bb7..a02702bf7a 100644
--- a/actionview/lib/action_view/helpers/date_helper.rb
+++ b/actionview/lib/action_view/helpers/date_helper.rb
@@ -1059,7 +1059,7 @@ module ActionView
prefix = @options[:prefix] || ActionView::Helpers::DateTimeSelector::DEFAULT_PREFIX
prefix += "[#{@options[:index]}]" if @options.has_key?(:index)
- field_name = @options[:field_name] || type
+ field_name = @options[:field_name] || type.to_s
if @options[:include_position]
field_name += "(#{ActionView::Helpers::DateTimeSelector::POSITION[type]}i)"
end