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