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.
This PR adds
relationship_opts
to thepaper_trail
dsl. It allows options to be specified that are passed to the generatedhas_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.