cache_digests
cache_digests copied to clipboard
Jbuilder support
I'm trying to use cache_digest gem with jbuilder (currently using Rails 3.x) I can't seem to make it work like this.
cache @videos do
json.partial! "api/videos/video", collection: @videos, as: :video
end
It throws an error:
NoMethodError - undefined method `length' for nil:NilClass:
actionpack (3.2.18) lib/action_view/helpers/cache_helper.rb:52:in`fragment_for'
cache_digests (0.3.1) lib/cache_digests/fragment_helper.rb:22:in `fragment_for'
Try, json.cache! @videos do