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