Module ActionView::Helpers::CacheHelper
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/helpers/action_view_mods.rb lib/haml/helpers/action_view_mods.rb CacheHelper FormTagHelper TagHelper FormHelper TextHelper CaptureHelper Helpers ActionView dot/m_83_1.png

Methods

External Aliases

fragment_for -> fragment_for_without_haml

Public Instance methods

fragment_for(*args, &block)

This is a workaround for a Rails 3 bug that‘s present at least through beta 3. Their fragment_for assumes that the block will return its contents as a string, which is not always the case. Luckily, it only makes this assumption if caching is disabled, so we only override that case.

[Source]

     # File lib/haml/helpers/action_view_mods.rb, line 183
183:         def fragment_for_with_haml(*args, &block)
184:           return fragment_for_without_haml(*args, &block) if controller.perform_caching
185:           capture(&block)
186:         end

[Validate]