Module: ActionView::Helpers::FormTagHelper

Defined in:
lib/haml/helpers/xss_mods.rb,
lib/haml/helpers/action_view_mods.rb,
lib/haml/helpers/action_view_mods.rb

Instance Method Summary collapse

Instance Method Details

#form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc) Also known as: form_tag



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/haml/helpers/action_view_mods.rb', line 139

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"
        with_tabs(1) {oldproc.call(*args)}
      end
    end
    res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
    res << "\n" if block_given?
    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 '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