app/models/product.rb
def rest_employees
      employee_array = []
      self.employees.uniq.each do |employee|
        employee_array << {"id" => employee.id, "first_name" => employee.first_name, "last_name" => employee.last_name}
      end
      return employee_array
    end
# All the following (before private) involve rest services
# Creates hash representation of product's employees for REST services
All the following (before private) involve rest services
Creates hash representation of product's employees for REST services
All the following ( before private ) involve rest services Creates hash representation of product ' s employees for REST services
def rest_employees
      employee_array = []
      self.employees.uniq.each do |employee|
        employee_array << {"id" => employee.id, "first_name" => employee.first_name, "last_name" => employee.last_name}
      end
      return employee_array
    end
def rest_employees employee_array = [ ] self . employees . uniq . each do | employee | employee_array << { "id" => employee . id , "first_name" => employee . first_name , "last_name" => employee . last_name } end return employee_array end
All the following (before private) involve rest services
Creates hash representation of product's employees for REST services
All the following ( before private ) involve rest services Creates hash representation of product ' s employees for REST services