Module: ActionView::Helpers::FormTagHelper
- Defined in:
- /tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/xss_mods.rb,
/tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/action_view_mods.rb,
/tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/action_view_mods.rb,
/tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/rails_323_textarea_fix.rb
Instance Method Summary (collapse)
- - form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc) (also: #form_tag)
- - form_tag_with_haml_xss(*args, &block)
- - text_area_tag_with_haml(*args)
Instance Method Details
- form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc) Also known as: form_tag
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File '/tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/action_view_mods.rb', line 155
def form_tag_with_haml(url_for_options = {}, options = {}, *parameters_for_url, &proc)
if is_haml?
wrap_block = block_given? && block_is_haml?(proc)
if wrap_block
oldproc = proc
proc = haml_bind_proc do |*args|
concat "\n"
with_tabs(1) {oldproc.call(*args)}
end
end
res = form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc) + "\n"
res << "\n" if wrap_block
res
else
form_tag_without_haml(url_for_options, options, *parameters_for_url, &proc)
end
end
|
- form_tag_with_haml_xss(*args, &block)
121 122 123 124 125 |
# File '/tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/xss_mods.rb', line 121
def form_tag_with_haml_xss(*args, &block)
res = form_tag_without_haml_xss(*args, &block)
res = Haml::Util.html_safe(res) unless block_given?
res
end
|
- text_area_tag_with_haml(*args)
28 29 30 |
# File '/tmp/buildd/ruby-haml-3.1.6/lib/haml/helpers/rails_323_textarea_fix.rb', line 28
def text_area_tag_with_haml(*args)
text_area_tag_without_haml(*args).sub('>
', ">\n").html_safe
end
|