Class: Role::AttributionRole

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

Overview

A AttributionRole is data within a project.

Direct Known Subclasses

AttributionCopyrightHolder, AttributionCreator, AttributionEditor, AttributionOwner

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

#update_cached, #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)

TODO: this doesn't do what we think it does



15
16
17
# File 'app/models/role/attribution_role.rb', line 15

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