Skip to content

Commit

Permalink
Fix documentation for end_year option of date_helper [ci skip]
Browse files Browse the repository at this point in the history
- 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 <csonpatki@gmail.com>

Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com>
  • Loading branch information
prathamesh-sonpatki committed Jan 3, 2014
1 parent 5aa8698 commit 2126c24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions actionview/lib/action_view/helpers/date_helper.rb
Expand Up @@ -170,8 +170,12 @@ def time_ago_in_words(from_time, include_seconds_or_options = {})
# * <tt>:use_month_names</tt> - Set to an array with 12 month names if you want to customize month names. # * <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. # 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>: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>:start_year</tt> - Set the start year for the year select. Default is <tt>Date.today.year - 5</tt>if
# * <tt>:end_year</tt> - Set the end year for the year select. Default is <tt>Date.today.year + 5</tt>. # 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 # * <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 # 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. # first of the given month in order to not create invalid dates like 31 February.
Expand Down

0 comments on commit 2126c24

Please sign in to comment.