app/lib/chief.rb
# Return the best estimates for fields, given project & current proposal.
# Current proposal is a hash, keys are symbols of what that might be changed.
Return the best estimates for fields, given project & current proposal.
Current proposal is a hash, keys are symbols of what that might be changed.
Return the best estimates for fields given project & current proposal . Current proposal is a hash keys are symbols of what that might be changed .
def compute_current(fields, project, current_proposal)
    result = {}
    fields.each do |f|
      if update_value?(project, f, current_proposal[f])
        result[f] = current_proposal[f][:value]
      elsif project.attribute_present?(f)
        result[f] = project[f]
      end
    end
    result
  end
def compute_current ( fields , project , current_proposal ) result = { } fields . each do | f | if update_value? ( project , f , current_proposal [ f ] ) result [ f ] = current_proposal [ f ] [ :value ] elsif project . attribute_present? ( f ) result [ f ] = project [ f ] end end result end
Return the best estimates for fields, given project & current proposal.
Return the best estimates for fields given project & current proposal .
fields
<not_specific>
project
<not_specific>
current_proposal
<not_specific>