I have this structure
user
-> profile
-> address (table)
-> workplace (table)
and i have this code that does not work as expected, it does not output the address nested association
def index
@users = User.all
render json: @users.as_json(include:
[:profile => {
:include => :address,:include =>:workplace
}
]
)
end
Aucun commentaire:
Enregistrer un commentaire