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

feature: summarizable associations #3428

Merged

Conversation

thiagoyoussef
Copy link
Contributor

Description

Fixes #2993

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

CleanShot 2024-11-15 at 13 14 34

Copy link

codeclimate bot commented Nov 15, 2024

Code Climate has analyzed commit 07c11f8 and detected 0 issues on this pull request.

View more on Code Climate.

@thiagoyoussef thiagoyoussef force-pushed the feature/summarizable-associations branch from 0036e9c to 26835c0 Compare November 15, 2024 17:11
Copy link
Contributor

@Paul-Bob Paul-Bob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall. The scope on association is not applying as expected

image

Let's ensure that we apply the field scope option instead of fetching all associated records using parent.send(association_name).

Copy link
Contributor

@Paul-Bob Paul-Bob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've provided some code snippets with suggestions (not tested) on how we might apply the scope from the association field

app/controllers/avo/charts_controller.rb Outdated Show resolved Hide resolved
app/controllers/avo/charts_controller.rb Outdated Show resolved Hide resolved
app/controllers/avo/charts_controller.rb Dismissed Show dismissed Hide dismissed
Copy link
Contributor

@Paul-Bob Paul-Bob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the effort on this PR @thiagoyoussef! I've applied some changes to target the parent field scope when present

@Paul-Bob Paul-Bob merged commit 4eb98cd into avo-hq:main Dec 2, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make summarizable work under association pages
2 participants