Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- emails = "atttt@bbb-inc.com, scott@sara.com, a@a.com, rasx@bo.com"
- User.rb (id,email)
- User.where("email IN (?)", emails)
- 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'))
- => []
- emails = "atttt@bbb-inc.com, scott@sara.com, a@a.com, rasx@bo.com".split(', ')
- User.where(:email => emails)
Add Comment
Please, Sign In to add comment