| Module | ActionView::Helpers::FormTagHelper |
| In: |
lib/haml/helpers/action_view_mods.rb
lib/haml/helpers/xss_mods.rb |
| form_tag | -> | form_tag_without_haml |
Alias for form_tag_with_haml
Alias for form_tag_with_haml
# File lib/haml/helpers/action_view_mods.rb, line 141
141: def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
142: if is_haml?
143: wrap_block = block_given? && block_is_haml?(proc)
144: if wrap_block
145: oldproc = proc
146: proc = haml_bind_proc do |*args|
147: concat "\n"
148: with_tabs(1) {oldproc.call(*args)}
149: end
150: end
151: res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
152: res << "\n" if wrap_block
153: res
154: else
155: form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc)
156: end
157: end
# File lib/haml/helpers/action_view_mods.rb, line 194
194: def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
195: if is_haml?
196: wrap_block = block_given? && block_is_haml?(proc)
197: if wrap_block
198: oldproc = proc
199: proc = haml_bind_proc do |*args|
200: concat "\n"
201: tab_up
202: oldproc.call(*args)
203: tab_down
204: concat haml_indent
205: end
206: concat haml_indent
207: end
208: res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
209: if block_given?
210: concat "\n"
211: return Haml::Helpers::ErrorReturn.new("form_tag")
212: end
213: res
214: else
215: form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc)
216: end
217: end
# File lib/haml/helpers/xss_mods.rb, line 121
121: def form_tag_with_haml_xss(*args, &block)
122: res = form_tag_without_haml_xss(*args, &block)
123: res = Haml::Util.html_safe(res) unless block_given?
124: res
125: end
Alias for form_tag
Alias for form_tag