From 2126c24af61dcbffb463da546776444e352be772 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Fri, 3 Jan 2014 03:00:58 +0530 Subject: Fix documentation for end_year option of date_helper [ci skip] - While editing an existing record, end_year is equal to current selected year plus 5 by default. - While editing an existing record, start_year is equal to current selected year value minus 5 by default. - Fixes #13552 Acked-by: Prathamesh Sonpatki Acked-by: Prathamesh Sonpatki --- actionview/lib/action_view/helpers/date_helper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actionview') 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 # * :use_month_names - 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. # * :date_separator - Specifies a string to separate the date fields. Default is "" (i.e. nothing). - # * :start_year - Set the start year for the year select. Default is Date.today.year - 5. - # * :end_year - Set the end year for the year select. Default is Date.today.year + 5. + # * :start_year - Set the start year for the year select. Default is Date.today.year - 5if + # you are creating new record. While editing existing record, :start_year defaults to + # current selected year minus 5. + # * :end_year - Set the end year for the year select. Default is Date.today.year + 5 if + # you are creating new record. While editing existing record, :end_year defaults to + # current selected year plus 5. # * :discard_day - 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. -- cgit v1.2.3