class PersonalDiplomaTag < Tag has_and_belongs_to_many :diplomas def get_visible_links(sort = :title) self.diplomas.where(:is_hidden => false).desc(:is_top, sort) end end