Class: Role::ProjectRole
- Inherits:
-
Role
- Object
- ActiveRecord::Base
- ApplicationRecord
- Role
- Role::ProjectRole
- Includes:
- Housekeeping
- Defined in:
- app/models/role/project_role.rb
Overview
Refactor after Housekeeping / FactoryBot issues resolved (nested set!!)
A ProjectRole is data within a project.
Direct Known Subclasses
AccessionProvider, Collector, DeaccessionRecipient, Determiner, Extractor, Georeferencer, LoanRecipient, LoanSupervisor, TaxonNameAuthor, Verifier
Instance Attribute Summary
Attributes inherited from Role
#organization_id, #person_id, #position, #project_id, #role_object_id, #role_object_type, #type
Attributes included from Housekeeping::Users
Instance Method Summary collapse
-
#set_project_if_possible ⇒ Object
protected
TODO: this doesn’t do what we think it does.
Methods included from Housekeeping
#has_polymorphic_relationship?
Methods inherited from Role
#agent, #agent_is_legal, #agent_present, #agent_type, #cached_trigger_methods, #cached_triggers, #do_not_set_cached, #is_last_role?, #only_one_agent, #organization_allowed?, #set_cached, #set_role_object_cached
Methods included from Shared::IsData
#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar
Methods included from Shared::PolymorphicAnnotator
#annotated_object_is_persisted?
Methods included from Housekeeping::Users
#set_created_by_id, #set_updated_by_id
Methods inherited from ApplicationRecord
Instance Method Details
#set_project_if_possible ⇒ Object (protected)
TODO: this doesn’t do what we think it does
18 19 20 |
# File 'app/models/role/project_role.rb', line 18 def set_project_if_possible self.project = self.role_object.project if self.role_object && self.project.nil? end |