Method: ActiveFedora::Associations::CollectionProxy#uniq
- Defined in:
- lib/active_fedora/associations/collection_proxy.rb
#uniq ⇒ Object
Specifies whether the records should be unique or not.
class Person < ActiveFedora::Base
has_many :pets
end
person.pets.select(:name)
# => [
# #<Pet name: "Fancy-Fancy">,
# #<Pet name: "Fancy-Fancy">
# ]
person.pets.select(:name).uniq
# => [#<Pet name: "Fancy-Fancy">]
659 660 661 |
# File 'lib/active_fedora/associations/collection_proxy.rb', line 659 def uniq @association.uniq end |