-
-
Notifications
You must be signed in to change notification settings - Fork 298
Open
Labels
BugSomething isn't workingSomething isn't working
Description
Describe the bug
If I have a model (A
), that has a has_one
assoc to another model (B), the show
page for model A
renders the has_one
for model B
with two problems:
- Model
B
does not have aShow
action, so there is no way to link to thehas_one
assoced resource. - Model
B
renders its parent model as abelongs_to
when it shouldn't - as we're already on the parent model's show page. (see screenshot)
Steps to use in the reproduction repository
- Create a model that has a
has_one
assoc to another model - Specify the
field
in your model ashas_one
- Go to your model's show page
- You will see there is no way to go from viewing your parent model to viewing the
has_one
assoced model. - Additionally, the embedded
has_one
model renders the parent model. This could be omitted for a cleaner and simpler view, as we're already viewing the parent model.
Expected behavior & Actual behavior
- There should be a way to jump to the
has_one
assoced model, when on the parent model's show page. - An embedded
has_one
assoc should omit its parent record.
System configuration
Avo version: 3.24.1
Rails version: 8.0.3
Ruby version: 3.3.6
License type:
- Community
- Pro
- Advanced
Are you using Avo monkey patches, overriding views or view components?
- Yes. If so, please post code samples.
- No
Screenshots or screen recordings

Additional context
Here's the thread on the Avo discord where this issue was originally discussed.
Impact
- High impact (It makes my app un-usable.)
- Medium impact (I'm annoyed, but I'll live.)
- Low impact (It's really a tiny thing that I could live with.)
Urgency
- High urgency (I can't continue development without it.)
- Medium urgency (I found a workaround, but I'd love to have it fixed.)
- Low urgency (It can wait. I just wanted you to know about it.)
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working
Type
Projects
Status
To Do