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 163 163: def form_for_with_haml(object_name, *args, &proc) 164: wrap_block = block_given? && is_haml? && block_is_haml?(proc) 165: if wrap_block 166: oldproc = proc 167: proc = proc {|*args| with_tabs(1) {oldproc.call(*args)}} 168: end 169: res = form_for_without_haml(object_name, *args, &proc) 170: res << "\n" if wrap_block 171: res 172: end
# File lib/haml/helpers/action_view_mods.rb, line 223 223: def form_for_with_haml(object_name, *args, &proc) 224: wrap_block = block_given? && is_haml? && block_is_haml?(proc) 225: if wrap_block 226: oldproc = proc 227: proc = haml_bind_proc do |*args| 228: tab_up 229: oldproc.call(*args) 230: tab_down 231: concat haml_indent 232: end 233: concat haml_indent 234: end 235: form_for_without_haml(object_name, *args, &proc) 236: concat "\n" if wrap_block 237: Haml::Helpers::ErrorReturn.new("form_for") if is_haml? 238: end