Module: Cache::Friendly::FragmentForPatch
- Defined in:
- lib/cache/friendly/fragment_for_patch.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/cache/friendly/fragment_for_patch.rb', line 4 def self.included(base) base.send :alias_method_chain, :fragment_for, :cache_friendly end |
Instance Method Details
#fragment_for_with_cache_friendly(name = {}, options = nil, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/cache/friendly/fragment_for_patch.rb', line 8 def fragment_for_with_cache_friendly(name = {}, = nil, &block) fragment = fragment_for_without_cache_friendly(name, , &block) <<-HTML.strip_heredoc <div style="background-color: rgba(0, 255, 23, 0.22) !important" data-cache-friendly=true> #{fragment} </div> HTML end |