Skip to content

Instantly share code, notes, and snippets.

@caseywatts
Created February 14, 2013 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caseywatts/4951330 to your computer and use it in GitHub Desktop.
Save caseywatts/4951330 to your computer and use it in GitHub Desktop.
Run this in a pry/irb session, with the Shifts database loaded.
profiles = UserProfile.all.select{|profile| profile.user.is_active?(Department.first)}
emails = []
profiles.each do |profile|
if profile.photo_file_name == nil
emails << profile.user.email
puts profile.user.email
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment