Module: ActionView::Helpers::FormHelper

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_for_with_haml(object_name, *args, &proc) Also known as: form_for



157
158
159
160
161
162
163
164
165
166
167
# File 'lib/haml/helpers/action_view_mods.rb', line 157

def form_for_with_haml(object_name, *args, &proc)
  if block_given? && is_haml?
    oldproc = proc
    proc = haml_bind_proc do |*args|
      with_tabs(1) {oldproc.call(*args)}
    end
  end
  res = form_for_without_haml(object_name, *args, &proc)
  res << "\n" if block_given? && is_haml?
  res
end

#form_for_with_haml_xss(*args, &block)



131
132
133
134
135
# File 'lib/haml/helpers/xss_mods.rb', line 131

def form_for_with_haml_xss(*args, &block)
  res = form_for_without_haml_xss(*args, &block)
  return Haml::Util.html_safe(res) if res.is_a?(String)
  return res
end