Skip to content

jBuilder 2.11.3, Rails 6.1.4.1 fail to render objects that are child of Simpledelegator #523

@net1957

Description

@net1957

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions