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
|
2007-12-27 00:19:13 -05:00
|
|
|
has_many :created_pages, :class_name => 'Page', :foreign_key => 'created_by'
|
|
|
|
has_many :updated_pages, :class_name => 'Page', :foreign_key => 'updated_by'
|
2008-01-02 02:58:03 -05:00
|
|
|
validates_uniqueness_of :title
|
2007-12-27 01:13:08 -05:00
|
|
|
|
|
|
|
##
|
|
|
|
# Finds me.
|
|
|
|
#
|
|
|
|
def self.penguincoder
|
2007-12-27 01:31:45 -05:00
|
|
|
@penguincoder ||= self.find_by_title('PenguinCoder') rescue nil
|
|
|
|
@penguincoder
|
2007-12-27 01:13:08 -05:00
|
|
|
end
|
2007-12-03 03:47:21 -05:00
|
|
|
end
|