class ActiveAdminAddons::InputBase
Public Instance Methods
concat(part)
click to toggle source
# File lib/activeadmin_addons/support/input_base.rb, line 49 def concat(part) parts << part end
input_html_options()
click to toggle source
Calls superclass method
# File lib/activeadmin_addons/support/input_base.rb, line 22 def input_html_options # maxwidth and size are added by Formtastic::Inputs::StringInput # but according to the HTML standard these are not valid attributes # on the inputs provided by this module super.except(:maxlength, :size).merge(control_attributes) end
load_control_attributes()
click to toggle source
# File lib/activeadmin_addons/support/input_base.rb, line 37 def load_control_attributes # Override on child classes if needed end
load_input_class()
click to toggle source
# File lib/activeadmin_addons/support/input_base.rb, line 33 def load_input_class load_class(self.class.to_s.underscore.dasherize) end
parts()
click to toggle source
# File lib/activeadmin_addons/support/input_base.rb, line 45 def parts @parts ||= [] end
parts_to_html()
click to toggle source
# File lib/activeadmin_addons/support/input_base.rb, line 29 def parts_to_html parts.flatten.join("\n").html_safe end
render_custom_input()
click to toggle source
# File lib/activeadmin_addons/support/input_base.rb, line 41 def render_custom_input # Override on child classes if needed end
to_html()
click to toggle source
Calls superclass method
# File lib/activeadmin_addons/support/input_base.rb, line 11 def to_html load_input_class load_control_attributes render_custom_input if parts.any? return input_wrapping { parts_to_html } else super end end