Module: ActionView::Helpers::FormTagHelper
- Defined in:
- lib/haml/helpers/xss_mods.rb,
lib/haml/helpers/action_view_mods.rb
Instance Method Summary collapse
- #form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc) (also: #form_tag)
- #form_tag_with_haml_xss(*args, &block)
Instance Method Details
#form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc) Also known as: form_tag
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/haml/helpers/action_view_mods.rb', line 135
def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
if is_haml?
if block_given?
oldproc = proc
proc = haml_bind_proc do |*args|
concat "\n"
tab_up
oldproc.call(*args)
tab_down
concat haml_indent
end
concat haml_indent
end
res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
if block_given?
concat "\n"
return Haml::Helpers::ErrorReturn.new("form_tag")
end
res
else
form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc)
end
end
|
#form_tag_with_haml_xss(*args, &block)
101 102 103 |
# File 'lib/haml/helpers/xss_mods.rb', line 101
def form_tag_with_haml_xss(*args, &block)
Haml::Util.html_safe(form_tag_without_haml_xss(*args, &block))
end
|