Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Jbuilder support #63

Open
jims3ne1 opened this issue Oct 9, 2014 · 1 comment
Open

Jbuilder support #63

jims3ne1 opened this issue Oct 9, 2014 · 1 comment

Comments

@jims3ne1
Copy link

jims3ne1 commented Oct 9, 2014

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'
@Overload119
Copy link

Try, json.cache! @videos do

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants