1 # A role is a collection of rights.
5 include DataMapper::Persistable
7 has_and_belongs_to_many :users
8 has_and_belongs_to_many :rights, :order => 'name ASC'
10 property :name, :string
11 property :description, :text
13 # Sets rights by list of id's passed in
14 def right_ids=(id_list)
19 self.rights << right if right