Module: SmartButtons::DeleteButton

Included in:
SmartButtons
Defined in:
lib/smart_buttons/delete_button.rb

Instance Method Summary collapse

Instance Method Details

#delete_button(url:, form_options: {}, button_options: {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/smart_buttons/delete_button.rb', line 4

def delete_button(url:, form_options: {}, button_options: {})
  form_tag url, method: :delete, **form_options do
    button_tag(**button_options) do
      yield if block_given?
    end
  end
end