Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FixCandidateStatus < ActiveRecord::Migration
- def up
- candidate_emails = %w(kudryavtsevsr@yandex.ru toroptsev@gmail.com chebotarev.roman@gmail.com volodeev90@gmail.com
- birkoff-shark@yandex.ru anatoliypeterman@gmail.com kdog@mail.ru
- rabotasurv@gmail.com feast.ker@gmail.com psaaa@yandex.ru)
- competition_ids = [3231,3208,3238]
- Cofoundit::SelectionResult.joins(:candidate)
- .where(competition_id: competition_ids, cofoundit_candidates: {email: candidate_emails})
- .update_all(status: 3)
- end
- end
Add Comment
Please, Sign In to add comment