lib/view.rb in garterbelt-0.0.2 vs lib/view.rb in garterbelt-0.0.3

- old
+ new

@@ -330,12 +330,11 @@ def cache_key(detail = CACHE_DETAIL_DEFAULT) detail ||= CACHE_DETAIL_DEFAULT "#{cache_key_base}_#{detail}" end - def cache(key, &block) - renderer = Cache.new(:view => self, :key => cache_key(key), &block) - buffer << renderer - renderer + def cache(key, opts={}, &block) + opts = opts.merge(:key => cache_key(key), :view => curator) + add_to_buffer Cache.new(opts, &block) end end end \ No newline at end of file