Class: Ronin::DB::OrganizationDepartment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ronin::DB::OrganizationDepartment
- Includes:
- Model, Model::HasName
- Defined in:
- lib/ronin/db/organization_department.rb
Overview
Represents a department of an organization.
Instance Attribute Summary collapse
-
#created_at ⇒ Time
readonly
Tracks when the organization was first created.
-
#email_address ⇒ EmailAddress?
The optional email address of the department.
-
#members ⇒ Array<OrganizationMember>
The members that belong to the department.
-
#organization ⇒ Organization
The organization that the department belongs to.
-
#parent_department ⇒ OrganizationDepartment?
The optional parent department of the subdepartment.
-
#phone_number ⇒ PhoneNumber?
The optional phone number of the department.
-
#street_address ⇒ StreetAddress?
The optional street address of the department.
-
#subdepartments ⇒ Array<OrganizationDepartment>
The associated subdepartments of the department.
Attributes included from Model::HasName
Method Summary
Methods included from Model::HasName
Methods included from Model
Instance Attribute Details
#created_at ⇒ Time (readonly)
Tracks when the organization was first created
74 |
# File 'lib/ronin/db/organization_department.rb', line 74 attribute :created_at, :datetime |
#email_address ⇒ EmailAddress?
The optional email address of the department.
61 |
# File 'lib/ronin/db/organization_department.rb', line 61 belongs_to :email_address, optional: true |
#members ⇒ Array<OrganizationMember>
The members that belong to the department.
88 |
# File 'lib/ronin/db/organization_department.rb', line 88 has_many :members, class_name: 'OrganizationMember' |
#organization ⇒ Organization
The organization that the department belongs to.
42 |
# File 'lib/ronin/db/organization_department.rb', line 42 belongs_to :organization |
#parent_department ⇒ OrganizationDepartment?
The optional parent department of the subdepartment.
67 68 |
# File 'lib/ronin/db/organization_department.rb', line 67 belongs_to :parent_department, optional: true, class_name: 'OrganizationDepartment' |
#phone_number ⇒ PhoneNumber?
The optional phone number of the department.
55 |
# File 'lib/ronin/db/organization_department.rb', line 55 belongs_to :phone_number, optional: true |
#street_address ⇒ StreetAddress?
The optional street address of the department.
49 |
# File 'lib/ronin/db/organization_department.rb', line 49 belongs_to :street_address, optional: true |
#subdepartments ⇒ Array<OrganizationDepartment>
The associated subdepartments of the department.
80 81 82 |
# File 'lib/ronin/db/organization_department.rb', line 80 has_many :subdepartments, class_name: 'OrganizationDepartment', foreign_key: :parent_department_id, dependent: :destroy |