def partial(name)
      name = self.class.generate_template_name name, config.file_template_extension

      # return self.read_template_from_media name, media
      @_cached_partials ||= {}
      (@_cached_partials[media] ||= {})[name] ||= self.read_template_from_media name, media
    end
def partial(name)
      name = self.class.generate_template_name name, config.file_template_extension

      # return self.read_template_from_media name, media
      @_cached_partials ||= {}
      (@_cached_partials[media] ||= {})[name] ||= self.read_template_from_media name, media
    end
Override this in your subclass if you want to do fun things like
 reading templates from a database. It will be rendered by the
 context, so all you need to do is return a string.