Sha256: 01d990e947703b571aa918d0ebd3f812dcdb14e697ac43c9db565acaf5807855
Contents?: true
Size: 437 Bytes
Versions: 4
Compression:
Stored size: 437 Bytes
Contents
class Role < ActiveRecord::Base has_many :administrators has_and_belongs_to_many :rights validates :name, :presence => true has_and_belongs_to_many :categories, :readonly => true, :join_table => 'categories_elements', :foreign_key => 'element_id', :association_foreign_key => 'category_id' define_index do indexes name, :sortable => true end def activate self.update_attribute('active', !self.active) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
forgeos_core-1.9.5.rc2 | app/models/role.rb |
forgeos_core-1.9.5.rc1 | app/models/role.rb |
forgeos_core-1.9.4 | app/models/role.rb |
forgeos_core-1.9.3 | app/models/role.rb |