molten-trunk/molten5/app/controllers/cases_controller.rb
def salesforce_params
    params = {:encoding => 'UTF-8', :orgid => '00D3000000002QQ', :recordType => '01230000000001X'}
    
    # in debug mode?
    if AppSetting.config("Salesforce Form Submissions") == AppSetting::SALESFORCE_FORM_SUBMISSIONS[:debug]
        logger.info("Adding case debug params")
        params.merge!({:debug => 1})
        params.merge!({:debugEmail => AppSetting.config("Technical Support Email")})
    end
    
    AppConstants::CASE_FIELD_MAPPING.each do |key,value|
      params.merge!({value => @case.attributes[key.to_s]})
    end
    logger.info("Created Support Case Params: #{params.to_a.map { |key_value| "#{key_value.first}: #{key_value.last}\n" }}")
    return params
  end
# Grabs only those attributes specified in +AppConstants::CASE_FIELD_MAPPING+ and converts them into a params string.
Grabs only those attributes specified in +AppConstants::CASE_FIELD_MAPPING+ and converts them into a params string.
Grabs only those attributes specified in + AppConstants :: CASE_FIELD_MAPPING + and converts them into a params string .
def salesforce_params
    params = {:encoding => 'UTF-8', :orgid => '00D3000000002QQ', :recordType => '01230000000001X'}
    if AppSetting.config("Salesforce Form Submissions") == AppSetting::SALESFORCE_FORM_SUBMISSIONS[:debug]
        logger.info("Adding case debug params")
        params.merge!({:debug => 1})
        params.merge!({:debugEmail => AppSetting.config("Technical Support Email")})
    end
    AppConstants::CASE_FIELD_MAPPING.each do |key,value|
      params.merge!({value => @case.attributes[key.to_s]})
    end
    logger.info("Created Support Case Params: #{params.to_a.map { |key_value| "#{key_value.first}: #{key_value.last}\n" }}")
    return params
  end
def salesforce_params params = { :encoding => 'UTF-8' , :orgid => '00D3000000002QQ' , :recordType => '01230000000001X' } if AppSetting . config ( "Salesforce Form Submissions" ) == AppSetting :: SALESFORCE_FORM_SUBMISSIONS [ :debug ] logger . info ( "Adding case debug params" ) params . merge! ( { :debug => 1 } ) params . merge! ( { :debugEmail => AppSetting . config ( "Technical Support Email" ) } ) end AppConstants :: CASE_FIELD_MAPPING . each do | key , value | params . merge! ( { value => @case . attributes [ key . to_s ] } ) end logger . info ( "Created Support Case Params: #{params.to_a.map { |key_value| "#{key_value.first}: #{key_value.last}\n" }}" ) return params end
Grabs only those attributes specified in +AppConstants::CASE_FIELD_MAPPING+ and converts them into a params string.
Grabs only those attributes specified in + AppConstants :: CASE_FIELD_MAPPING + and converts them into a params string .
# in debug mode?