Module: SmartButtons::PatchButton
- Included in:
- SmartButtons
- Defined in:
- lib/smart_buttons/patch_button.rb
Instance Method Summary collapse
Instance Method Details
#patch_button(**options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/smart_buttons/patch_button.rb', line 4 def (**) simple_form_for [:record], url: [:url], method: :patch, html: [:form_options] do |f| [:attributes].each do |attr| concat build_input attr, , f end concat((type: :submit, **[:button_options]) do yield if block_given? end) end end |