aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-03 16:41:33 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-03 16:41:33 -0200
commit0cd7b7ba3bb151ad0c3fce9006c80f7d541681f9 (patch)
treefd342458db1c56a13f1d7810d4b99addcba31ceb
parent96c4bd69c101b866b80a3ca5424439c87791af5e (diff)
parent2126c24af61dcbffb463da546776444e352be772 (diff)
downloadrails-0cd7b7ba3bb151ad0c3fce9006c80f7d541681f9.tar.gz
rails-0cd7b7ba3bb151ad0c3fce9006c80f7d541681f9.tar.bz2
rails-0cd7b7ba3bb151ad0c3fce9006c80f7d541681f9.zip
Merge pull request #13579 from prathamesh-sonpatki/issue-13552
Fix documentation for end_year option of date_helper [ci skip]
-rw-r--r--actionview/lib/action_view/helpers/date_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb
index 7fe6accfbf..19035771a6 100644
--- a/actionview/lib/action_view/helpers/date_helper.rb
+++ b/actionview/lib/action_view/helpers/date_helper.rb
@@ -170,8 +170,12 @@ module ActionView
# * <tt>:use_month_names</tt> - Set to an array with 12 month names if you want to customize month names.
# Note: You can also use Rails' i18n functionality for this.
# * <tt>:date_separator</tt> - Specifies a string to separate the date fields. Default is "" (i.e. nothing).
- # * <tt>:start_year</tt> - Set the start year for the year select. Default is <tt>Date.today.year - 5</tt>.
- # * <tt>:end_year</tt> - Set the end year for the year select. Default is <tt>Date.today.year + 5</tt>.
+ # * <tt>:start_year</tt> - Set the start year for the year select. Default is <tt>Date.today.year - 5</tt>if
+ # you are creating new record. While editing existing record, <tt>:start_year</tt> defaults to
+ # <tt>current selected year minus 5</tt>.
+ # * <tt>:end_year</tt> - Set the end year for the year select. Default is <tt>Date.today.year + 5</tt> if
+ # you are creating new record. While editing existing record, <tt>:end_year</tt> defaults to
+ # <tt>current selected year plus 5</tt>.
# * <tt>:discard_day</tt> - Set to true if you don't want to show a day select. This includes the day
# as a hidden field instead of showing a select field. Also note that this implicitly sets the day to be the
# first of the given month in order to not create invalid dates like 31 February.