class ActiveRecord::Associations::CollectionProxy

def distinct

# => [#]
person.pets.select(:name).distinct

# ]
# #
# #,
# => [
person.pets.select(:name)

end
has_many :pets
class Person < ActiveRecord::Base

Specifies whether the records should be unique or not.
def distinct
  @association.distinct
end