Created
September 25, 2008 22:55
-
-
Save gregbell/12975 to your computer and use it in GitHub Desktop.
This file contains 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
# Find all the proper employees | |
employees = Employee.find(:all, :conditions => 'conditions to get the right employees') | |
# Add the employee that we want (by email address) | |
# to the top of the list | |
# Then call uniq on it to remove the duplicate | |
employees.unshift(employees.find{ |employee| employee.email_address == "email we want at the top" }).uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment