Sha256: 06a039d8e8d7e8959691e18abb0fe56a648b8646861d6f8d0aebf9e0c65d65f7
Contents?: true
Size: 627 Bytes
Versions: 1
Compression:
Stored size: 627 Bytes
Contents
class ComboboxInput < Formtastic::Inputs::SelectInput include ActionView::Helpers::UrlHelper def input_html_options super.merge({:class => "#{super[:class]} combobox", :style => "width => 60%"}) end 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 def to_html input_wrapping do label_html << (options[:group_by] ? grouped_select_html : select_html) << link_fragment end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bookyt-0.0.1 | app/inputs/combobox_input.rb |