I have such action in my controller:
@user = Ads::User\.find current\_user\.id @postings = Rails\.cache\.fetch\("@user\.postings\.includes\(:category\)"\) do @postings = @user\.postings\.includes\(:category\) end
I'm trying to cache @postings and get such error:
This would try and cache the activerecord::relation object rather the
actual query results.
You need to force execution of the query, ie