Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
Add Comment
Please, Sign In to add comment