https://avo.cool logo
Linking to a `has_one` assoc in a resources show p...
# avo-3
f
Hey Avo friends! I noticed something strange... I've got a model (
A
) that has a
has_one
assoc to another model (
B
). When I've viewing the show page for
A
, model
B
renders underneath, but strangely, there is no link to jump to model `B`'s show page. To illustrate, here's a screenshot. Am I bad at reading docs, or is this something Avo doesn't do (yet, hopefully)? https://cdn.discordapp.com/attachments/1138182212655788054/1423217009490923540/image.png?ex=6986f021&is=69859ea1&hm=7dc8cee963dc15261dcf64c08f464d1c3fab27b9612f879ba61ddb675b63145c&
m
Thread automatically created by gee-forr in #1138182212655788054
f
I reckon another useful enhancement would be to not show the linked "parent" record (☝️
Creative Assets
in this case) in the embedded
has_one
as we're already on that page....
l
Hi @few-beach-88179 i'm trying it on my side
This should be working for sure
Just tested it
Do you have a
field :task_main_template, as: :belongs_to
on the checklist?
And indeed the show button do not render, there isn't a way to navigate to that record
Actually... I found some places where it isn’t working. Seems to be a bug. Could you please open a GH issue for this? 1. The
has_one
field does not render the "Show" control button. 2. The
has_one
field renders the parent
belongs_to
when it shouldn’t.
f
hey @loud-jewelry-99127 - nice one. Thanks for confirming 🙂 I'll log an issue and reference this thread too.
l
Awesome, thank you!
f
l
Thanks, BTW if you want to give it a try with a contribution I would love to guide you throught the code base 😄
f
@loud-jewelry-99127 - I'm currently chasing some intense deadlines for the few next weeks. If the issue hasn't been picked up by then, I'd really love to take a crack at resolving it myself with guidance from you 🙂 thanks for the offer!
l
My plate is pretty full right now, so most likely I won’t be able to pick this up by then. Give me a ping whenever you want to tackle it, I can give you some hints on where to start looking and debugging
f
you got it!