This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2007-12-03 03:47:21 -05:00
|
|
|
##
|
|
|
|
# This model represents a user in the system.
|
|
|
|
#
|
|
|
|
class People < ActiveRecord::Base
|
|
|
|
has_one_tuxwiki_page :owner_class => 'People'
|
2007-12-06 12:31:17 -05:00
|
|
|
belongs_to :role
|
|
|
|
attr_protected :role_id
|
|
|
|
validates_presence_of :role_id
|
|
|
|
|
|
|
|
before_create :set_base_role
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
##
|
|
|
|
# Sets the Role to the top level model.
|
|
|
|
#
|
|
|
|
def set_base_role
|
|
|
|
self.role = Role.base_role
|
|
|
|
end
|
2007-12-03 03:47:21 -05:00
|
|
|
end
|