app/models/applications/application_for_offering.rb
# Adds an ApplicationReviewer to this application as a reviewer. Parameter can be either an OfferingReviewer ID or a CommitteeMember object.
Adds an ApplicationReviewer to this application as a reviewer. Parameter can be either an OfferingReviewer ID or a CommitteeMember object.
Adds an ApplicationReviewer to this application as a reviewer . Parameter can be either an OfferingReviewer ID or a CommitteeMember object .
def add_reviewer(reviewer)
    if reviewer.is_a?(Integer)
      self.reviewers.create :offering_reviewer_id => reviewer
    elsif reviewer.is_a?(CommitteeMember)
      return false if (mentors.collect(&:person_id).include?(reviewer.person_id) unless offering.allow_to_review_mentee) && !reviewer.person_id.nil?
      self.reviewers.create :committee_member_id => reviewer.id
    end
    self.save
  end
def add_reviewer ( reviewer ) if reviewer . is_a? ( Integer ) self . reviewers . create :offering_reviewer_id => reviewer elsif reviewer . is_a? ( CommitteeMember ) return false if ( mentors . collect ( & :person_id ) . include? ( reviewer . person_id ) unless offering . allow_to_review_mentee ) && ! reviewer . person_id . nil? self . reviewers . create :committee_member_id => reviewer . id end self . save end
Adds an ApplicationReviewer to this application as a reviewer.
Adds an ApplicationReviewer to this application as a reviewer .
reviewer