2011-10-13 16:55:03 +01:00
|
|
|
class Role < ActiveRecord::Base
|
|
|
|
has_many :permissions
|
2011-10-23 22:39:44 +01:00
|
|
|
has_many :rights, :through => :permissions
|
2011-10-19 21:19:45 +01:00
|
|
|
has_many :relations, :through => :role_lines
|
2011-10-23 22:39:44 +01:00
|
|
|
|
|
|
|
serialize :can_see, Hash
|
|
|
|
|
|
|
|
validate :name, :presence => true
|
2011-10-13 16:55:03 +01:00
|
|
|
end
|