class ActionView::Helpers::FormBuilder
Public Instance Methods
actions(options = {}) { || ... }
click to toggle source
# File lib/pineapples/templates/lib/extensions/form_builder.rb, line 9 def actions(options = {}, &block) update_options_with_class!(options, 'form-actions') @template.content_tag(:div, options) { yield } end
inputs(options = {}) { || ... }
click to toggle source
# File lib/pineapples/templates/lib/extensions/form_builder.rb, line 4 def inputs(options = {}, &block) update_options_with_class!(options, 'form-inputs') @template.content_tag(:div, options) { yield } end
Protected Instance Methods
update_options_with_class!(options, klass)
click to toggle source
# File lib/pineapples/templates/lib/extensions/form_builder.rb, line 16 def update_options_with_class!(options, klass) options[:class] ||= '' class_string = options[:class].blank? ? klass : " #{klass}" options[:class] << class_string options end