Module: DatePicker::FormHelper::FormBuilderMethods
- Defined in:
- lib/date_picker/form_helper.rb
Instance Method Summary collapse
- #date_picker(attribute, options = {}, html_options = {}) ⇒ Object
- #datetime_picker(attribute, options = {}, html_options = {}) ⇒ Object
- #time_picker(attribute, options = {}, html_options = {}) ⇒ Object
Instance Method Details
#date_picker(attribute, options = {}, html_options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/date_picker/form_helper.rb', line 16 def date_picker(attribute, = {}, = {}) [:id]||= DatePicker::FormHelper.field_id(self.object_name, attribute) @template.date_picker_tag("#{self.object_name}[#{attribute}]", self.object.send(attribute), , ) end |
#datetime_picker(attribute, options = {}, html_options = {}) ⇒ Object
21 22 23 24 |
# File 'lib/date_picker/form_helper.rb', line 21 def datetime_picker(attribute, = {}, = {}) [:id]||= DatePicker::FormHelper.field_id(self.object_name, attribute) @template.datetime_picker_tag("#{self.object_name}[#{attribute}]", self.object.send(attribute), , ) end |
#time_picker(attribute, options = {}, html_options = {}) ⇒ Object
26 27 28 29 |
# File 'lib/date_picker/form_helper.rb', line 26 def time_picker(attribute, = {}, = {}) [:id]||= DatePicker::FormHelper.field_id(self.object_name, attribute) @template.time_picker_tag("#{self.object_name}[#{attribute}]", self.object.send(attribute), , ) end |