Module: FormtasticBootstrap::Inputs::Base::Timeish
- Included in:
- DateInput, DatetimeInput, TimeInput
- Defined in:
- lib/formtastic-bootstrap/inputs/base/timeish.rb
Instance Method Summary collapse
- #date_input_html ⇒ Object
- #fragment_id(fragment) ⇒ Object
- #fragment_input_html(fragment, klass) ⇒ Object
- #time_input_html ⇒ Object
Instance Method Details
#date_input_html ⇒ Object
6 7 8 |
# File 'lib/formtastic-bootstrap/inputs/base/timeish.rb', line 6 def date_input_html fragment_input_html(:date, "small") end |
#fragment_id(fragment) ⇒ Object
14 15 16 17 18 |
# File 'lib/formtastic-bootstrap/inputs/base/timeish.rb', line 14 def fragment_id(fragment) # TODO is this right? # "#{input_html_options[:id]}_#{position(fragment)}i" "#{[:id]}[#{fragment}]" end |
#fragment_input_html(fragment, klass) ⇒ Object
20 21 22 23 |
# File 'lib/formtastic-bootstrap/inputs/base/timeish.rb', line 20 def fragment_input_html(fragment, klass) opts = .merge(:prefix => fragment_prefix, :field_name => fragment_name(fragment), :default => value, :include_blank => include_blank?) template.send(:"text_field_#{fragment}", value, opts, .merge(:id => fragment_id(fragment), :class => klass)) end |
#time_input_html ⇒ Object
10 11 12 |
# File 'lib/formtastic-bootstrap/inputs/base/timeish.rb', line 10 def time_input_html fragment_input_html(:time, "mini") end |