From d904c7817f385a0a08c5643279effe6466ece507 Mon Sep 17 00:00:00 2001 From: Aditya Sanghi Date: Sat, 9 Oct 2010 21:23:11 +0530 Subject: [PATCH] remove redundant examples add note about use of :ignore_date option in time_select --- actionpack/lib/action_view/helpers/date_helper.rb | 17 ++--------------- 1 files changed, 2 insertions(+), 15 deletions(-) diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 3aee4fb..36c7514 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -207,7 +207,8 @@ module ActionView # +object+). You can include the seconds with :include_seconds. # # This method will also generate 3 input hidden tags, for the actual year, month and day unless the option - # :ignore_date is set to +true+. + # :ignore_date is set to +true+. If this option is used, it is imperative that a date_select + # on the same attribute is also included in the form. # # If anything is passed in the html_options hash it will be applied to every select tag in the set. # @@ -215,21 +216,10 @@ module ActionView # # Creates a time select tag that, when POSTed, will be stored in the post variable in the sunrise attribute # time_select("post", "sunrise") # - # # Creates a time select tag that, when POSTed, will be stored in the order variable in the submitted - # # attribute - # time_select("order", "submitted") - # - # # Creates a time select tag that, when POSTed, will be stored in the mail variable in the sent_at attribute - # time_select("mail", "sent_at") - # # # Creates a time select tag with a seconds field that, when POSTed, will be stored in the post variables in # # the sunrise attribute. # time_select("post", "start_time", :include_seconds => true) # - # # Creates a time select tag with a seconds field that, when POSTed, will be stored in the entry variables in - # # the submission_time attribute. - # time_select("entry", "submission_time", :include_seconds => true) - # # # You can set the :minute_step to 15 which will give you: 00, 15, 30 and 45. # time_select 'game', 'game_time', {:minute_step => 15} # @@ -239,9 +229,6 @@ module ActionView # time_select("post", "written_on", :prompt => true) # generic prompts for all # # The selects are prepared for multi-parameter assignment to an Active Record object. - # - # Note: If the day is not included as an option but the month is, the day will be set to the 1st to ensure that - # all month choices are valid. def time_select(object_name, method, options = {}, html_options = {}) InstanceTag.new(object_name, method, self, options.delete(:object)).to_time_select_tag(options, html_options) end -- 1.7.1