Module: RailsSweetAlert2Confirm::ViewHelpers

Defined in:
lib/rails_sweetalert2_confirm/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#button_tag(*args, &block) ⇒ Object



19
20
21
22
23
# File 'lib/rails_sweetalert2_confirm/view_helpers.rb', line 19

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


8
9
10
11
12
# File 'lib/rails_sweetalert2_confirm/view_helpers.rb', line 8

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



14
15
16
17
# File 'lib/rails_sweetalert2_confirm/view_helpers.rb', line 14

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