Module: ActionView::Helpers::TextFieldDateHelper
- Included in:
- ActionView::Helpers
- Defined in:
- lib/action_view/helpers/text_field_date_helper.rb
Instance Method Summary collapse
-
#date_text_field(object_name, method, options = {}, html_options = {}) ⇒ Object
These two handle an object with a method that returns a Date or Time object.
-
#text_field_date(date = Date.current, options = {}, html_options = {}) ⇒ Object
These two handle Date and Time objects.
- #text_field_time(time = Time.current, options = {}, html_options = {}) ⇒ Object
- #time_text_field(object_name, method, options = {}, html_options = {}) ⇒ Object
Instance Method Details
#date_text_field(object_name, method, options = {}, html_options = {}) ⇒ Object
These two handle an object with a method that returns a Date or Time object.
9 10 11 |
# File 'lib/action_view/helpers/text_field_date_helper.rb', line 9 def date_text_field(object_name, method, = {}, = {}) InstanceTag.new(object_name, method, self, .delete(:object)).to_date_text_field_tag(, ) end |
#text_field_date(date = Date.current, options = {}, html_options = {}) ⇒ Object
These two handle Date and Time objects.
18 19 20 |
# File 'lib/action_view/helpers/text_field_date_helper.rb', line 18 def text_field_date(date = Date.current, = {}, = {}) DateTimeSelector.new(date, , ).text_field_date end |
#text_field_time(time = Time.current, options = {}, html_options = {}) ⇒ Object
22 23 24 |
# File 'lib/action_view/helpers/text_field_date_helper.rb', line 22 def text_field_time(time = Time.current, = {}, = {}) DateTimeSelector.new(time, , ).text_field_time end |
#time_text_field(object_name, method, options = {}, html_options = {}) ⇒ Object
13 14 15 |
# File 'lib/action_view/helpers/text_field_date_helper.rb', line 13 def time_text_field(object_name, method, = {}, = {}) InstanceTag.new(object_name, method, self, .delete(:object)).to_time_text_field_tag(, ) end |