Class: GenericFormFor::Actions::ButtonAction

Inherits:
Object
  • Object
show all
Includes:
Base, Icon
Defined in:
lib/generic_form_for/actions/button_action.rb

Instance Attribute Summary

Attributes included from Base

#builder, #method, #object, #object_name, #options, #template

Instance Method Summary collapse

Methods included from Base

#action_html_options, #action_options, #button_text, #default_action_options, #form_builder_options, #initialize, #merge_action_html_options, #to_html, #wrap_in

Methods included from I18n

#translate, #translate_action, #translate_hint, #translate_label, #translate_legend, #translate_placeholder

Instance Method Details

#action_html(config_options = {}, &html_block) ⇒ Object



7
8
9
10
# File 'lib/generic_form_for/actions/button_action.rb', line 7

def action_html(config_options={}, &html_block)
  icon = template.capture(&html_block) if block_given?
  template.concat template.button_tag("#{icon}#{button_text}".html_safe, merge_action_html_options(action_html_options,config_options))
end