Class: Ronin::DB::OrganizationMember
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ronin::DB::OrganizationMember
- Includes:
- Model
- Defined in:
- lib/ronin/db/organization_member.rb
Overview
Represents a member of an Organization.
Instance Attribute Summary collapse
-
#active ⇒ Boolean
Specifies whether the member is active or not.
-
#created_at ⇒ Time
readonly
Tracks when the member was first created.
-
#department ⇒ Department?
The department that belongs to within the organization.
-
#email_address ⇒ EmailAddress?
The member's organization email address.
-
#id ⇒ Integer
Primary key of the member.
-
#organization ⇒ Organization
The organization that the member belongs to.
-
#person ⇒ Person
The person that belongs to the organization.
-
#phone_number ⇒ EmailAddress?
The member's organization phone number.
-
#rank ⇒ String?
The member's rank.
-
#role ⇒ String?
The member's role within the organization.
-
#title ⇒ String?
The member's title.
-
#type ⇒ "advisor", ...
The type of organization membership.
-
#updated_at ⇒ Time
readonly
Tracks when the member was last updated.
Class Method Summary collapse
-
.active ⇒ Array<Member>
Queries members that are currently active.
-
.former ⇒ Array<Member>
Queries former members.
Instance Method Summary collapse
-
#to_s ⇒ String
Converts the organization member to a String.
Methods included from Model
Instance Attribute Details
#active ⇒ Boolean
Specifies whether the member is active or not.
49 |
# File 'lib/ronin/db/organization_member.rb', line 49 attribute :active, :boolean, default: true |
#created_at ⇒ Time (readonly)
Tracks when the member was first created.
116 |
# File 'lib/ronin/db/organization_member.rb', line 116 attribute :created_at, :datetime |
#department ⇒ Department?
The department that belongs to within the organization.
92 |
# File 'lib/ronin/db/organization_member.rb', line 92 belongs_to :department, optional: true |
#email_address ⇒ EmailAddress?
The member's organization email address.
104 |
# File 'lib/ronin/db/organization_member.rb', line 104 belongs_to :email_address, optional: true |
#id ⇒ Integer
Primary key of the member.
43 |
# File 'lib/ronin/db/organization_member.rb', line 43 attribute :id, :integer |
#organization ⇒ Organization
The organization that the member belongs to.
98 |
# File 'lib/ronin/db/organization_member.rb', line 98 belongs_to :organization |
#person ⇒ Person
The person that belongs to the organization.
86 |
# File 'lib/ronin/db/organization_member.rb', line 86 belongs_to :person |
#phone_number ⇒ EmailAddress?
The member's organization phone number.
110 |
# File 'lib/ronin/db/organization_member.rb', line 110 belongs_to :phone_number, optional: true |
#rank ⇒ String?
The member's rank.
80 |
# File 'lib/ronin/db/organization_member.rb', line 80 attribute :rank, :string |
#role ⇒ String?
The member's role within the organization.
68 |
# File 'lib/ronin/db/organization_member.rb', line 68 attribute :role, :string |
#title ⇒ String?
The member's title.
74 |
# File 'lib/ronin/db/organization_member.rb', line 74 attribute :title, :string |
#type ⇒ "advisor", ...
The type of organization membership.
55 56 57 58 59 60 61 62 |
# File 'lib/ronin/db/organization_member.rb', line 55 enum :type, { advisor: 'advisor', volunteer: 'volunteer', employee: 'employee', contractor: 'contractor', intern: 'intern', board_member: 'board member' } |
#updated_at ⇒ Time (readonly)
Tracks when the member was last updated.
122 |
# File 'lib/ronin/db/organization_member.rb', line 122 attribute :updated_at, :datetime |
Class Method Details
.active ⇒ Array<Member>
Queries members that are currently active.
129 130 131 |
# File 'lib/ronin/db/organization_member.rb', line 129 def self.active where(active: true) end |
.former ⇒ Array<Member>
Queries former members.
138 139 140 |
# File 'lib/ronin/db/organization_member.rb', line 138 def self.former where(active: false) end |
Instance Method Details
#to_s ⇒ String
Converts the organization member to a String.
147 148 149 |
# File 'lib/ronin/db/organization_member.rb', line 147 def to_s person.to_s end |