app/models/product.rb
# Creates hash representation of product's services for REST services
Creates hash representation of product's services for REST services
Creates hash representation of product ' s services for REST services
def rest_services
      service_array = []
      self.services.uniq.each do |service|
        service_array << {"id" => service.id, "name" => service.name}
      end
      return service_array
    end
def rest_services service_array = [ ] self . services . uniq . each do | service | service_array << { "id" => service . id , "name" => service . name } end return service_array end
Creates hash representation of product's services for REST services
Creates hash representation of product ' s services for REST services