Module: RailsSweetAlert2Confirm::ViewHelpers

Defined in:
lib/rails_sweetalert2_confirm/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#button_tag(*args, &block) ⇒ Object



16
17
18
19
20
# File 'lib/rails_sweetalert2_confirm/view_helpers.rb', line 16

def button_tag(*args, &block)
  options = args[block_given? ? 0 : 1] || {}
  options = merge_options_into_swal(options)
  super(*args, &block)
end


5
6
7
8
9
# File 'lib/rails_sweetalert2_confirm/view_helpers.rb', line 5

def link_to(*args, &block)
  options = args[block_given? ? 1 : 2] || {}
  options = merge_options_into_swal(options)
  super(*args, &block)
end

#submit_tag(value = 'Save changes', options = {}) ⇒ Object



11
12
13
14
# File 'lib/rails_sweetalert2_confirm/view_helpers.rb', line 11

def submit_tag(value = 'Save changes', options = {})
  options = merge_options_into_swal(options)
  super value, options
end