molten-trunk/molten5/app/helpers/cases_helper.rb
# Generates an Array of accounts that should be saved with created case reports. 
# The array of accounts reflects the accounts used in the current view. 
#
# - Not viewing a report => Account array from current contact
# - Viewing a report w/params[:accounts] empty => Account array from current report
# - Viewing a report w/params[:accounts] NOT empty => Account array from params[:accounts]
Generates an Array of accounts that should be saved with created case reports.
The array of accounts reflects the accounts used in the current view.

Not viewing a report => Account array from current contact
Viewing a report w/params[:accounts] empty => Account array from current report
Viewing a report w/params[:accounts] NOT empty => Account array from params[:accounts]
Generates an Array of accounts that should be saved with created case reports . The array of accounts reflects the accounts used in the current view . Not viewing a report = > Account array from current contact Viewing a report w / params [ : accounts ] empty = > Account array from current report Viewing a report w / params [ : accounts ] NOT empty = > Account array from params [ : accounts ]
def case_report_account_array
    if @case_report_account_array
      @case_report_account_array
    elsif @case_report.nil?
      @case_report_account_array = current_contact.set_account_filters
    elsif @case_report.account_array
      if params[:accounts].is_a?(Array)
        @case_report_account_array = Sfaccount.find(params[:accounts])
      else
        @case_report_account_array = @case_report.account_array
      end
    else
      @case_report_account_array = current_contact.set_account_filters
    end
  end
def case_report_account_array if @case_report_account_array @case_report_account_array elsif @case_report . nil? @case_report_account_array = current_contact . set_account_filters elsif @case_report . account_array if params [ :accounts ] . is_a? ( Array ) @case_report_account_array = Sfaccount . find ( params [ :accounts ] ) else @case_report_account_array = @case_report . account_array end else @case_report_account_array = current_contact . set_account_filters end end
Generates an Array of accounts that should be saved with created case reports.
Generates an Array of accounts that should be saved with created case reports .