Replace deprecated methods find(:all) and uniq_by.