lib/catche/controller/base.rb in catche-0.1.0 vs lib/catche/controller/base.rb in catche-0.1.1

- old
+ new

@@ -11,10 +11,11 @@ # # catche Project, :index # catche Task, :through => :project def catche(model, *args) options = args.extract_options! - tag = Proc.new { |controller| Catche::Tag::Object.for(model, controller.class, options) } + object = Catche::Tag::Object.register!(model, self, options) + tag = Proc.new { |controller| object } # Use Rails caches_action to pass along the tag caches_action(*args, { :tag => tag }.merge(options)) end \ No newline at end of file