Introduce Judge model#1146
Conversation
|
I'm a little late to suggest this, so totally fine to be overruled, but any chance that we could make the table called "judges" and have a "Judge" model? |
@littleforest |
|
Thank you for putting in all this work! Hopefully we can finish it up this coming week. Feel free to ask any question anytime, here or in slack :) |
7d9a495 to
5b1aa35
Compare
|
Hi @compwron and @littleforest, This is ready for review :-) |
littleforest
left a comment
There was a problem hiding this comment.
@khiga8 thanks so much for making the change to the Judge model!
Could you also add some request specs? I think spec/requests/contact_type_spec.rb is a good example to follow. (Though please use the plural and call your file spec/requests/judges_spec.rb).
|
Please also run |
5b1aa35 to
b30b5f7
Compare
**What** * introduces a new `Judge` model which belongs to a casa_org. * allows a new judge to be added per organization * allows existing judge to be edited * allows `active` status to be set per judge **How** * ensures that new judge can be added to org. * ensures that judge exists on Edit organization page. * tests controller paths
b30b5f7 to
ad80160
Compare
| @@ -0,0 +1,7 @@ | |||
| FactoryBot.define do | |||
| factory :judge do | |||
| casa_org { create(:casa_org) } | |||
There was a problem hiding this comment.
This is fine, but for future simplicity, you can just write it like:
FactoryBot.define do
factory :judge do
casa_org
name { Faker::Name.name }
active { true }
end
end
And it will automatically create the casa_org association.
littleforest
left a comment
There was a problem hiding this comment.
🎉 💯 👯♀️ @khiga8 thanks so much for your hard work on this! Looks great!
|
You are invited to the CASA asynchronous retrospective-and-futurespective! Please take a look at https://bit.ly/casaretro (no login required) and add at least one note! Even if it's just "I was here and you are cool" or "omg y'all why do you keep messaging me" we want to hear it. <3
|
What github issue is this PR for, if any?
Resolves #929
What changed, and why?
Judgemodel which belongs to a casa_org.activestatus to be set per judgeHow is this tested? (please write tests!) 💖💪
Screenshots please :)