From a9c6a583b6ed4b6482652f98c2aeda1a60268fc9 Mon Sep 17 00:00:00 2001 From: Lachlan Sylvester Date: Fri, 28 Aug 2015 15:31:54 +1000 Subject: Fix calling cache helper with a relation --- actionview/test/fixtures/project.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionview/test/fixtures') diff --git a/actionview/test/fixtures/project.rb b/actionview/test/fixtures/project.rb index c124a9e605..404b12cbab 100644 --- a/actionview/test/fixtures/project.rb +++ b/actionview/test/fixtures/project.rb @@ -1,3 +1,7 @@ class Project < ActiveRecord::Base has_and_belongs_to_many :developers, -> { uniq } + + def self.collection_cache_key(collection = all, timestamp_column = :updated_at) + "projects-#{collection.count}" + end end -- cgit v1.2.3