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 |
NewerOlder