Module: CalculationResultHelper

Defined in:
app/helpers/calculation_result_helper.rb

Instance Method Summary collapse

Instance Method Details

#ignored_fields_for(calculation) ⇒ Array<Symbol>

in them which will not be used, this method will list those inputs

Parameters:

  • calculation (Calculation)

    If a result is given early and the inputs have data

Returns:

  • (Array<Symbol>)

    A list of inputs that will be ignored


5
6
7
8
9
10
11
# File 'app/helpers/calculation_result_helper.rb', line 5

def ignored_fields_for(calculation)
  case calculation.final_decision_by.to_sym
  when :disposable_capital then [:benefits_received, :number_of_children, :total_income]
  when :benefits_received then [:number_of_children, :total_income]
  else []
  end
end