Skip to content

Commit da713da

Browse files
Resolves #4689 - Update seeds: mark users invitation_status as "accepted" (#4705)
* Update seed users to mark invitation status accepted * Update with PR suggestions
1 parent 1b1e251 commit da713da

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -798,4 +798,4 @@ DEPENDENCIES
798798
webmock (~> 3.24)
799799

800800
BUNDLED WITH
801-
2.5.20
801+
2.5.21

db/seeds.rb

+14
Original file line numberDiff line numberDiff line change
@@ -865,3 +865,17 @@ def seed_quantity(item_name, organization, storage_location, quantity)
865865
]
866866
)
867867
TransferCreateService.call(transfer)
868+
869+
# ----------------------------------------------------------------------------
870+
# Users invitation status
871+
# ----------------------------------------------------------------------------
872+
# Mark users `invitation_status` as `accepted`
873+
#
874+
# Addresses and resolves issue #4689, which can be found in:
875+
# https://github.com/rubyforgood/human-essentials/issues/4689
876+
User.where(invitation_token: nil).each do |user|
877+
user.update!(
878+
invitation_sent_at: Time.current,
879+
invitation_accepted_at: Time.current
880+
)
881+
end

0 commit comments

Comments
 (0)