Class: Role::ProjectRole

Inherits:
Role show all
Includes:
Housekeeping
Defined in:
app/models/role/project_role.rb

Overview

TODO:

Refactor after Housekeeping / FactoryBot issues resolved (nested set!!)

A ProjectRole is data within a project.

Direct Known Subclasses

AccessionProvider, Collector, DeaccessionRecipient, Determiner, Georeferencer, LoanRecipient, LoanSupervisor, TaxonNameAuthor, TypeDesignator

Instance Attribute Summary

Attributes inherited from Role

#person_id, #position, #project_id, #role_object_id, #role_object_type, #type

Attributes included from Housekeeping::Users

#by

Instance Method Summary (collapse)

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods inherited from Role

#vet_person

Methods included from Housekeeping::Timestamps

#data_breakdown_for_chartkick_recent

Methods included from Housekeeping::Users

#set_created_by_id, #set_updated_by_id

Methods included from ActiverecordUtilities

#trim_attributes

Instance Method Details

- (Object) set_project_if_possible (protected)



16
17
18
# File 'app/models/role/project_role.rb', line 16

def set_project_if_possible
  self.project = self.role_object.project if self.role_object && self.project.nil?
end