Skip to content
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

Add seed data for announcements #3899

Merged
merged 4 commits into from
Oct 12, 2023

Conversation

clair13
Copy link
Contributor

@clair13 clair13 commented Oct 8, 2023

Resolves #3847

Description

I have created seed data for the BroadcastAnnouncment model, one created from a super-admin for banks to be able to see and one created from banks for partners to be able to see. I have created 2 additional users and given them 2 different roles and then created seed data for the announcement.
Another solution is to not create 2 additional users and add specific roles to 2 existing random users and then create the seed data. Like this u = random_record(User)
Please fell free to let me know if you prefer this solution or if you want to change the messages that banks and partners see to something else.

PS.
Sorry for the delay in this pull request,but faced some challenges in the past weeks in my area.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

First, i run bin/rails db:drop
Then bin/rails db:setup to seed with the new data in the seeds file.
Also if you run a query in the rails console BroadcastAnnouncement.all
you can see the screenshots, one for the banks and one for the partners.

Screenshots

Announcement for the Banks

banks

Announcement for the partners

parners

@scooter-dangle
Copy link
Collaborator

Per sunday hours sesh discussion, @clair13 is going to use two of our pre-existing seeded users for sending these announcements.

@clair13
Copy link
Contributor Author

clair13 commented Oct 8, 2023

I have updated the seeds file in order to use existing users as @scooter-dangle suggested. Please let me know if you want to change the message that is displayed to banks/partners to something more specific for the BroadcastAnnouncement model or anything else.

@dorner
Copy link
Collaborator

dorner commented Oct 12, 2023

Looks good! Thanks for the contribution!

@dorner dorner merged commit 2af4182 into rubyforgood:main Oct 12, 2023
11 checks passed
@github-actions
Copy link
Contributor

@clair13: Your PR/Issue Add seed data for announcements is part of today's Human Essentials production release: 2023.10.15.
Thank you very much for your contribution!

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.

Add announcement to seed
3 participants