Open net1957 opened 3 years ago
I have to correct. It fail always wit or without cache;
in fact the error seem's to be a bit bad!
the partial is:
json.CdpHut do json.Hut cdplist.nhut json.Dmaj cdplist.dmaj json.Dtransfer cdplist.dexport end
if I pass directly a AR record it's working as expected with or without cache: true
So I think that the object (that have SimpleDelegatot in parents class) I'm passing is not supported.
but it work if I don't use partials:
Can you provide an example application that reproduce the issue?
In my case, the objects rendered are child of Simpledelegator Class
I get this error as soon I add cached: true to my json.jbuilder view:
ActionView::Template::Error (undefined method
nhut' for [#<Cmdmary::Etudprix`The Cmdmary::Etudprix is the AR object and not the Decorated object (that define nhut) passed to the json.
Jbuilder use also Delegator if cached is true. Perhaps this colide with mine?
Without cached: true, all is working without problem. Any advice how to make this work?