134: def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
135: if is_haml?
136: if block_given?
137: oldproc = proc
138: proc = haml_bind_proc do |*args|
139: concat "\n"
140: tab_up
141: oldproc.call(*args)
142: tab_down
143: concat haml_indent
144: end
145: concat haml_indent
146: end
147: res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
148: concat "\n" if block_given?
149: res
150: else
151: form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc)
152: end
153: end