Method: Manageable::Helpers::FormBuilder#button
- Defined in:
- lib/manageable/helpers/form_builder.rb
#button(value = nil, options = {}) ⇒ Object
Generates an activo compliant submit button
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/manageable/helpers/form_builder.rb', line 18 def (value=nil, ={}) value, = nil, value if value.is_a?(Hash) value ||= I18n.t("manageable.save") [:class] = [[:class], "button"].compact.join(" ") image = @template.image_tag(.delete(:image) || "/assets/manageable/icons/tick.png", :alt => value) @template.() do [image, value].compact.join(" ").html_safe end end |