Class: LoanRecipient

Inherits:
Role::ProjectRole show all
Defined in:
app/models/loan_recipient.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Role::ProjectRole

#set_project_if_possible

Methods included from Housekeeping

#has_polymorphic_relationship?

Class Method Details

.human_name ⇒ Object



3
4
5
# File 'app/models/loan_recipient.rb', line 3

def self.human_name
  'Loan recipient'
end

Instance Method Details

#year_active_year ⇒ Object



7
8
9
10
11
12
# File 'app/models/loan_recipient.rb', line 7

def year_active_year
  [ role_object.date_requested&.year,
    role_object.date_received&.year,
    #  role_object.date_closed&.year,  # post humous return
  ].compact.first
end