app/models/offerings/offering_admin_phase.rb
def status_types(result_type = [:in_progress, :success, :failure])
    result_type = [result_type] unless result_type.is_a?(Array)
    results = []
    for t in result_type
      raise "Invalid status type. Must be one of :in_progress, :success, or :failure." unless [:in_progress, :success, :failure].include?(t)
      raw = read_attribute("#{t}_application_status_types")
      next if raw.blank?
      arr = []
      results << ApplicationStatusType.find_all_by_name(raw.split(/[\n\|\s]/)).collect(&:name)
    end
    results.flatten
  end
# Returns an array of the ApplicationStatusType names that are associated with this phase. Pass a result type
# of :in_progress, :success, or :failure to limit it to that result type.
# For example, ["new", "in_progress", "submitted", "complete"].
Returns an array of the ApplicationStatusType names that are associated with this phase. Pass a result type
of :in_progress, :success, or :failure to limit it to that result type.
Returns an array of the ApplicationStatusType names that are associated with this phase . Pass a result type of : in_progress : success or : failure to limit it to that result type .
def status_types(result_type = [:in_progress, :success, :failure])
    result_type = [result_type] unless result_type.is_a?(Array)
    results = []
    for t in result_type
      raise "Invalid status type. Must be one of :in_progress, :success, or :failure." unless [:in_progress, :success, :failure].include?(t)
      raw = read_attribute("#{t}_application_status_types")
      next if raw.blank?
      arr = []
      results << ApplicationStatusType.find_all_by_name(raw.split(/[\n\|\s]/)).collect(&:name)
    end
    results.flatten
  end
def status_types ( result_type = [ :in_progress , :success , :failure ] ) result_type = [ result_type ] unless result_type . is_a? ( Array ) results = [ ] for t in result_type raise "Invalid status type. Must be one of :in_progress, :success, or :failure." unless [ :in_progress , :success , :failure ] . include? ( t ) raw = read_attribute ( "#{t}_application_status_types" ) next if raw . blank? arr = [ ] results << ApplicationStatusType . find_all_by_name ( raw . split ( / [ \n \| \s ] / ) ) . collect ( & :name ) end results . flatten end
Returns an array of the ApplicationStatusType names that are associated with this phase.
Returns an array of the ApplicationStatusType names that are associated with this phase .
result_type