-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
Case contacts contact made default yes #6023
Case contacts contact made default yes #6023
Conversation
I think I would rather we do the change via that helper method that you pointed out. The logic being, typically the data base schema essentially outlines the "axioms" or fundamental truth of the application (ex: a user can only belong to one organization, case contact must belong to a case). In this case I would consider the default to be more of "business" logic. This is what the users want at the moment and they might just want it to change again in the future, we have no reason to tie ourselves to that decision. Thus, its better to do it in the ruby code and that helper looks like a great place for it. |
Thanks for the help. Previously, the Please let me know what you think of this solution :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small bit of feedback but overall LGTM! Thanks!
What github issue is this PR for, if any?
Resolves #6016
What changed, and why?
This changes the default value for the
contact_made
column totrue
. This was done via a migration. Please let me know if that's alright or if we should do it via helpers and change the radio_button checked value.I'm still learning and I am very much open to suggestions.
How is this tested? (please write tests!) 💖💪
One of the specs was testing if
@case_contact.contact_made
was blank/false. With this change, thecase_contact
column will be true so the test failed. I removed this attribute from the tests as with the new migration, it is not the case for it to be blank.Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
![alt text](https://media.giphy.com/media/1nP7ThJFes5pgXKUNf/giphy.gif)