Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link_to_record: true, remember ?via_record_id=xxx&via_resource_class=yyy #3475

Open
pjmuller opened this issue Dec 2, 2024 · 1 comment
Open
Labels
Enhancement Not necessarily a feature, but something has improved Help wanted We could use some help with this Stale exempt

Comments

@pjmuller
Copy link

pjmuller commented Dec 2, 2024

Feature

see https://www.loom.com/share/eb42935e2725476f945e60b79ff84d40

When clicking on rows within an association and you have the link_to_record: true,
we go the right record ✅ but forget the association ❌ which makes the user experience inconsistent
This is especially the case with the global config.click_row_to_view_record = true which does the right thing on all non belongs-to columns, but forgets about the via_record_id parameter on belongs_to fields...

# resource 1 (table)
field :columns, as: :has_many

# resource 2 (columns)
def fields
        field :foobar, as: :belongs_to, link_to_record: true # correctly will open the `column` resource (i.s.o. foobar) yet forgets about the table (resource 1)
end

Current workarounds

switch all :belongs_to to :text and format_using in !view.form? but feels very dirty

@Paul-Bob Paul-Bob moved this to To Do in Issues Dec 2, 2024
Copy link
Contributor

This issue has been marked as stale because there was no activity for the past 15 days.

@github-actions github-actions bot added the Stale label Dec 18, 2024
@adrianthedev adrianthedev added Enhancement Not necessarily a feature, but something has improved Help wanted We could use some help with this Stale exempt and removed Stale labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not necessarily a feature, but something has improved Help wanted We could use some help with this Stale exempt
Projects
Status: To Do
Development

No branches or pull requests

2 participants