This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/app/models/people.rb

21 lines
375 B
Ruby
Raw Normal View History

##
# This model represents a user in the system.
#
class People < ActiveRecord::Base
has_one_tuxwiki_page :owner_class => 'People'
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
end