Skip to content

chore set belongs_to_required_by_default to true in config #2259

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

Conversation

davidmillen50
Copy link
Contributor

this belongs_to setting in planner/config/application.rb has been set to true.

config.active_record.belongs_to_required_by_default = true

there were many failing tests and after trying to build the associations with the fabricate test fixtures which was seemingly not possible I set some associations to optional to resolve the tests.

Some tests failing due to expected associations being mandatory.  Resolved this wiusing optional: true for meeting_note and meeting_talk models
@davidmillen50 davidmillen50 force-pushed the set-belongs-to-required-by-default-to-true branch from 5c95dca to 5e879db Compare August 9, 2025 18:50
Event test failed because venue was not optional when it should be because an event van be virtual and therefore have no venue
Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on!

@olleolleolle
Copy link
Collaborator

(Test were flaky, so I hit "Rerun" in CI.)

@olleolleolle olleolleolle merged commit 0372363 into codebar:master Aug 12, 2025
2 of 3 checks passed
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