Created
March 11, 2013 22:11
-
-
Save caseywatts/5138333 to your computer and use it in GitHub Desktop.
Get emails of users who have worked in a location over a time period (Shifts app)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user_emails = [] | |
Shift.after_date(Time.now - 4.weeks).find_all_by_location_id(44).each do |sh| | |
user_emails << sh.user.email | |
end | |
user_emails = user_emails.uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment