Guest User

Untitled

a guest
Jan 18th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. emails = "atttt@bbb-inc.com, scott@sara.com, a@a.com, rasx@bo.com"
  2.  
  3. User.rb (id,email)
  4.  
  5. User.where("email IN (?)", emails)
  6. User Load (1.0ms) SELECT "users".* FROM "users" WHERE (users.deleted_at IS NULL) AND (email IN ('atttt@bbb-inc.com,, scott@sara.com, a@a.com, rasx@bo.com'))
  7. => []
  8.  
  9. emails = "atttt@bbb-inc.com, scott@sara.com, a@a.com, rasx@bo.com".split(', ')
  10.  
  11. User.where(:email => emails)
Add Comment
Please, Sign In to add comment