Class: ComboboxInput
- Inherits:
-
Formtastic::Inputs::SelectInput
- Object
- Formtastic::Inputs::SelectInput
- ComboboxInput
- Includes:
- ActionView::Helpers::UrlHelper
- Defined in:
- app/inputs/combobox_input.rb
Instance Method Summary collapse
Instance Method Details
#input_html_options ⇒ Object
4 5 6 |
# File 'app/inputs/combobox_input.rb', line 4 def super.merge({:class => "#{super[:class]} combobox", :style => "width => 60%"}) end |
#link_fragment ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/inputs/combobox_input.rb', line 8 def link_fragment reference = object.send(reflection.name) return unless reference template.content_tag('span', template.link_to('show', @object.send(reflection.name), :class => 'icon-combolink-text'), :class => 'combobox-link') end |
#to_html ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/inputs/combobox_input.rb', line 16 def to_html input_wrapping do label_html << ([:group_by] ? grouped_select_html : select_html) << link_fragment end end |