diff options
author | Marek <marek.kirejczyk@gmail.com> | 2016-06-05 13:12:23 +0200 |
---|---|---|
committer | Marek <marek.kirejczyk@gmail.com> | 2016-06-05 13:12:23 +0200 |
commit | 3cf2a7184bccfb15945980d52da9666ff05c5dfd (patch) | |
tree | c50f4d25015fe96647d0ae1285e537dc89ed23fe /actionview/lib | |
parent | 8fc355e2341f943f8533fbafa64a787c1633f086 (diff) | |
download | rails-3cf2a7184bccfb15945980d52da9666ff05c5dfd.tar.gz rails-3cf2a7184bccfb15945980d52da9666ff05c5dfd.tar.bz2 rails-3cf2a7184bccfb15945980d52da9666ff05c5dfd.zip |
Make select_year work with include_position: true option, fix #25267
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/date_helper.rb | 2 |
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 9042b9cffd..cee056206c 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1058,7 +1058,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 |