Module: ActionView::Helpers::FormTagHelper
- Defined in:
- /build/buildd/ruby-haml-3.1.4/lib/haml/helpers/xss_mods.rb,
/build/buildd/ruby-haml-3.1.4/lib/haml/helpers/action_view_mods.rb,
/build/buildd/ruby-haml-3.1.4/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
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File '/build/buildd/ruby-haml-3.1.4/lib/haml/helpers/action_view_mods.rb', line 155
def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
if is_haml?
wrap_block = block_given? && block_is_haml?(proc)
if wrap_block
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)
121 122 123 124 125 |
# File '/build/buildd/ruby-haml-3.1.4/lib/haml/helpers/xss_mods.rb', line 121
def form_tag_with_haml_xss(*args, &block)
res = form_tag_without_haml_xss(*args, &block)
res = Haml::Util.html_safe(res) unless block_given?
res
end
|