module Fragmentary::FragmentsHelper

Public Instance Methods

cache_fragment(options, &block) click to toggle source
# File lib/fragmentary/fragments_helper.rb, line 5
def cache_fragment(options, &block)
  CacheBuilder.new(self).cache_fragment(options, &block)
end
fragment_builder(options) click to toggle source
# File lib/fragmentary/fragments_helper.rb, line 9
def fragment_builder(options)
  # the template option is deprecated but avoids breaking prior usage
  template = options.delete(:template) || self
  options.reverse_merge!(:user => Template.new(template).current_user)
  CacheBuilder.new(template, Fragmentary::Fragment.base_class.existing(options))
end