app/services/request_list.rb
def request_type_value(param_value)
        if param_value == "absence"
          { request_type: "AbsenceRequest" }
        elsif param_value == "travel"
          { request_type: "TravelRequest" }
        elsif Request.travel_categories.values.include?(param_value)
          { request_type: "TravelRequest", travel_category: param_value }
        else
          { request_type: "AbsenceRequest", absence_type: param_value }
        end
      end
# translate a param into a property value
translate a param into a property value
translate a param into a property value
def request_type_value(param_value)
        if param_value == "absence"
          { request_type: "AbsenceRequest" }
        elsif param_value == "travel"
          { request_type: "TravelRequest" }
        elsif Request.travel_categories.values.include?(param_value)
          { request_type: "TravelRequest", travel_category: param_value }
        else
          { request_type: "AbsenceRequest", absence_type: param_value }
        end
      end
def request_type_value ( param_value ) if param_value == "absence" { request_type : "AbsenceRequest" } elsif param_value == "travel" { request_type : "TravelRequest" } elsif Request . travel_categories . values . include? ( param_value ) { request_type : "TravelRequest" , travel_category : param_value } else { request_type : "AbsenceRequest" , absence_type : param_value } end end
translate a param into a property value
translate a param into a property value
param_value