Description
Discussed in #3185
Originally posted by cmaxw August 23, 2024
I used the rails generator to generate a partial card for one of my resources. When I added it to the resource, it wouldn't load.
I clicked the link that says "This is not an issue with Avo. Use this page to see why this frame failed to load."
It showed a long backtrace that went into the bowels of Avo's Card rendering. Better Errors clearly wasn't helping here.
Then, I looked at my logs. It showed that it had generated a view with @dashboard.id
called. Since I put this card into a resource, @dashboard
was nil
and it caused the error.
So, I recommend you either conditionally call @dashboard.id
or @resource.id
to avoid the nil issue, or take it out altogether and put the instructions into the generated view as text.
Approach
We should remove the dashboard
reference and see if parent
works here. If not, let's conditionally add dashboard or resource (but I think parent should work).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status