module Adminterface::Extensions::Inputs::Base::Groupish
Public Instance Methods
input_html()
click to toggle source
Calls superclass method
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 6 def input_html return super unless grouping? template.content_tag :div, class: "input-group" do html = [] html.push prepend_html if prepend_html? html.push super html.push append_html if append_html? html.join.html_safe end end
wrapper_html_options()
click to toggle source
Calls superclass method
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 18 def wrapper_html_options return super unless grouping? new_class = [super[:class], "input-group"].compact.join(" ") super.merge(class: new_class) end
Private Instance Methods
append_html()
click to toggle source
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 31 def append_html options[:append] end
append_html?()
click to toggle source
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 43 def append_html? append_html.present? end
grouping?()
click to toggle source
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 35 def grouping? append_html? || prepend_html? end
prepend_html()
click to toggle source
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 27 def prepend_html options[:prepend] end
prepend_html?()
click to toggle source
# File lib/adminterface/extensions/inputs/base/groupish.rb, line 39 def prepend_html? prepend_html.present? end