Module: WithPopup::Helpers::FormTagHelper

Includes:
Util
Included in:
WithPopup::Helpers
Defined in:
lib/with_popup/helpers/form_tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#button_with_popup_tag(content_or_options = nil, options = {}, &block) ⇒ Object



16
17
18
19
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 16

def button_with_popup_tag(content_or_options = nil, options = {}, &block)
  add_with_popup_option_to!(options)
  button_tag(content_or_options, options, &block)
end

#button_with_popup_to(name = nil, options = nil, html_options = {}, &block) ⇒ Object



21
22
23
24
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 21

def button_with_popup_to(name = nil, options = nil, html_options = {}, &block)
  add_with_popup_option_to!(html_options)
  button_to(name, options, html_options, &block)
end

#image_submit_with_popup_tag(source, options = {}) ⇒ Object



11
12
13
14
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 11

def image_submit_with_popup_tag(source, options = {})
  add_with_popup_option_to!(options)
  image_submit_tag(source, options)
end


26
27
28
29
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 26

def link_with_popup_to(name = nil, options = nil, html_options = {}, &block)
  add_with_popup_option_to!(html_options)
  link_to(name, options, html_options, &block)
end


31
32
33
34
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 31

def link_with_popup_to_if(condition, name, options = {}, html_options = {}, &block)
  add_with_popup_option_to!(html_options)
  link_to_if(condition, name, options, html_options, &block)
end


36
37
38
39
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 36

def link_with_popup_to_unless(condition, name, options = {}, html_options = {}, &block)
  add_with_popup_option_to!(html_options)
  link_to_unless(condition, name, options, html_options, &block)
end


41
42
43
44
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 41

def link_with_popup_to_unless_current(name, options = {}, html_options = {}, &block)
  add_with_popup_option_to!(html_options)
  link_to_unless_current(name, options, html_options, &block)
end

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



6
7
8
9
# File 'lib/with_popup/helpers/form_tag_helper.rb', line 6

def submit_with_popup_tag(value = 'Save changes', options = {})
  add_with_popup_option_to!(options)
  submit_tag(value, options)
end