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