Module: LoanRecipientsHelper

Defined in:
app/helpers/loan_recipients_helper.rb

Instance Method Summary (collapse)

Instance Method Details



9
10
11
# File 'app/helpers/loan_recipients_helper.rb', line 9

def loan_recipient_link(loan)
  link_to(loan_recipient_tag(loan).html_safe, loan)
end

- (Object) loan_recipient_tag(loan)



3
4
5
6
7
# File 'app/helpers/loan_recipients_helper.rb', line 3

def loan_recipient_tag(loan)
  return nil if loan.nil?
  recipients = loan.loan_recipients.collect{|lr| person_tag(lr)}.join.html_safe
  recipients.blank? ? 'No recipients defined!' : recipients
end