Module: ActionView::Helpers::FormHelper

Defined in:
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



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/haml/helpers/action_view_mods.rb', line 163

def form_for_with_haml(object_name, *args, &proc)
  if block_given? && is_haml?
    oldproc = proc
    proc = haml_bind_proc do |*args|
      tab_up
      oldproc.call(*args)
      tab_down
      concat haml_indent
    end
    concat haml_indent
  end
  form_for_without_haml(object_name, *args, &proc)
  concat "\n" if block_given? && is_haml?
  Haml::Helpers::ErrorReturn.new("form_for") if is_haml?
end