Skip to content

Instantly share code, notes, and snippets.

@lcw
Forked from anonymous/ruby array
Created January 12, 2010 16:21
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 lcw/275322 to your computer and use it in GitHub Desktop.
Save lcw/275322 to your computer and use it in GitHub Desktop.
@destinations=Array.new
@harvest.people.find(:all).each do |p|
unless p.is_contractor
unless p.is_active==false
unless ["AM","Sales","Management","Executive","OPS","Marketing"].include? p.department
entries = p.entries :from => @beginning_date, :to => @ending_date
unless (entries and entries.length > 0)
@destinations << p.email
end
end
end
end
end
HarvestReminder::Email.send("Hey there!\n\nThis is a list of who recieved a friendly reminder to enter and submit their time for the week of #{@beginning_date.strftime("%Y-%m-%d")}\n\n #{@destinations.each { |i| print i, "\n"}}", ["bret.wilcox@effectiveui.com"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment