Guest User

Untitled

a guest
May 18th, 2018
670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. class FixCandidateStatus < ActiveRecord::Migration
  2. def up
  3. candidate_emails = %w(kudryavtsevsr@yandex.ru toroptsev@gmail.com chebotarev.roman@gmail.com volodeev90@gmail.com
  4. birkoff-shark@yandex.ru anatoliypeterman@gmail.com kdog@mail.ru
  5. rabotasurv@gmail.com feast.ker@gmail.com psaaa@yandex.ru)
  6. competition_ids = [3231,3208,3238]
  7.  
  8. Cofoundit::SelectionResult.joins(:candidate)
  9. .where(competition_id: competition_ids, cofoundit_candidates: {email: candidate_emails})
  10. .update_all(status: 3)
  11. end
  12. end
Add Comment
Please, Sign In to add comment