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

improvement: allow opts to be passed to the generated relationship #92

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

ahey
Copy link
Contributor

@ahey ahey commented Jul 10, 2024

This PR adds relationship_opts to the paper_trail dsl. It allows options to be specified that are passed to the generated has_many :paper_trail_versions relationship that is created on the resource. Any options given override the default options in the existing transformer.

This change was made to allow public?: true to be specified, allowing the versions relationship to be exposed over graphql, and adding more flexibility.

I've covered the change with some unit tests, although there was one existing, unrelated failing test that remains in a failing state.

I have also added a few dsl options to the .formatter locals_without_parens that were missing.

@zachdaniel zachdaniel merged commit fce4942 into ash-project:main Jul 10, 2024
12 of 15 checks passed
@ahey ahey deleted the relationship-opts branch July 13, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants