| 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 199
199: def form_for_with_haml(object_name, *args, &proc)
200: if block_given? && is_haml?
201: oldproc = proc
202: proc = haml_bind_proc do |*args|
203: tab_up
204: oldproc.call(*args)
205: tab_down
206: concat haml_indent
207: end
208: concat haml_indent
209: end
210: form_for_without_haml(object_name, *args, &proc)
211: concat "\n" if block_given? && is_haml?
212: end