Module ActionView::Helpers::TagHelper
In: lib/haml/helpers/action_view_mods.rb
Base\n[lib/haml/helpers/action_view_mods.rb\nlib/haml/template/patch.rb\nlib/haml/template/plugin.rb] InstanceTag lib/haml/template/plugin.rb lib/haml/helpers/action_view_mods.rb FormTagHelper TagHelper FormHelper TextHelper CaptureHelper Helpers ActionView dot/m_14_0.png

Methods

External Aliases

content_tag -> content_tag_without_haml

Public Instance methods

content_tag(name, *args, &block)

[Source]

     # File lib/haml/helpers/action_view_mods.rb, line 98
 98:       def content_tag_with_haml(name, *args, &block)
 99:         return content_tag_without_haml(name, *args, &block) unless is_haml?
100: 
101:         preserve = haml_buffer.options[:preserve].include?(name.to_s)
102: 
103:         if block_given? && block_is_haml?(block) && preserve
104:           return content_tag_without_haml(name, *args) {preserve(&block)}
105:         end
106: 
107:         returning content_tag_without_haml(name, *args, &block) do |content|
108:           return Haml::Helpers.preserve(content) if preserve && content
109:         end
110:       end

[Validate]