class Repertoire < ActiveRecord::Base default_scope :order => 'updated_at desc' attr_accessible :name has_many :sub_repertoires, :dependent => :destroy, :order => "sub_repertoires.updated_at desc" has_many :subjects scope :field_for_list, lambda{select([:id, :name])} #has_many :mirror_repositories end