-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Issue 5844: Seeder other duties #5903
Conversation
…crements to the other_duties_counter each time and prints statement of how many other duties were created
… OtherDuty.create
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.
Thanks for the PR! A small request to make it more similar to some of our other seeders.
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.
could you add other_duties to
Line 50 in 350963b
def active_record_classes |
db/seeds/db_populator.rb
Outdated
@other_duties_counter = + 1 | ||
} | ||
end | ||
puts "Created #{@other_duties_counter} Other Duties." |
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.
If we add the count to the main seeds.rb
file we don't need the puts or the counter.
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.
LGTM! Thank you ❤️
What github issue is this PR for, if any?
Resolves 5844
What changed, and why?
@create_other_duties_counter
attr.initialized
equal to0
create_other_duties
was created; iterates through eachVolunteer object
and creates2
OtherDuty
instances per volunteerother_duty
is created it, isincremented onto the counter
(+= 1)
prints how many other duties have been created
by string interpolating the final counterHow is this tested? (please write tests!) 💖💪
Issue does not require tests;
Tested locally in Rails Console using Volunteer and OtherDuty objects + Faker for dummy data.
Screenshots please :)
From the console:
Feelings gif (optional)
_What gif best describes your feeling working on this issue? https://giphy.com/