app/models/offerings/offering_admin_phase_task.rb
# Returns the relevant records depending on the context, based on the phase's settings for status, etc.
Returns the relevant records depending on the context, based on the phase's settings for status, etc.
Returns the relevant records depending on the context based on the phase ' s settings for status etc .
def relevant_records
    case context
    when "applicant"      then  phase.all_applications
    when "mentors"        then  phase.all_applications.collect(&:mentors).flatten
    when "group_members"  then  phase.all_applications.collect(&:group_members).flatten
    when "reviewers"      then  (phase.all_applications.collect{|a| a.reviewers.without_committee_scores} + offering.reviewers).flatten
    when "interviewers"   then  (phase.all_applications.collect(&:interviewers) + offering.interviewers).flatten
    end
  end
def relevant_records case context when "applicant" then phase . all_applications when "mentors" then phase . all_applications . collect ( & :mentors ) . flatten when "group_members" then phase . all_applications . collect ( & :group_members ) . flatten when "reviewers" then ( phase . all_applications . collect { | a | a . reviewers . without_committee_scores } + offering . reviewers ) . flatten when "interviewers" then ( phase . all_applications . collect ( & :interviewers ) + offering . interviewers ) . flatten end end
Returns the relevant records depending on the context, based on the phase's settings for status, etc.
Returns the relevant records depending on the context based on the phase ' s settings for status etc .