| Module | ActionView::Helpers::FormHelper |
| In: |
lib/haml/helpers/action_view_mods.rb
lib/haml/helpers/xss_mods.rb |
| form_for | -> | form_for_without_haml |
# File lib/haml/helpers/action_view_mods.rb, line 162
162: def form_for_with_haml(object_name, *args, &proc)
163: if block_given? && is_haml?
164: oldproc = proc
165: proc = proc {|*args| with_tabs(1) {oldproc.call(*args)}}
166: end
167: res = form_for_without_haml(object_name, *args, &proc)
168: res << "\n" if block_given? && is_haml?
169: res
170: end
# File lib/haml/helpers/action_view_mods.rb, line 220
220: def form_for_with_haml(object_name, *args, &proc)
221: if block_given? && is_haml?
222: oldproc = proc
223: proc = haml_bind_proc do |*args|
224: tab_up
225: oldproc.call(*args)
226: tab_down
227: concat haml_indent
228: end
229: concat haml_indent
230: end
231: form_for_without_haml(object_name, *args, &proc)
232: concat "\n" if block_given? && is_haml?
233: Haml::Helpers::ErrorReturn.new("form_for") if is_haml?
234: end