diff options
author | Zachary Scott <mail@zzak.io> | 2015-06-26 16:47:49 -0400 |
---|---|---|
committer | Zachary Scott <mail@zzak.io> | 2015-06-26 16:47:49 -0400 |
commit | 4b4075be11753b49b240adbbefead712e83ca1a7 (patch) | |
tree | 35cd439fbec9f097478651846b450331d065c349 /activerecord/lib | |
parent | 0bee4100f10dec672b70ad63856149c85d8cbc95 (diff) | |
parent | 03f35fc439fc4a10c1bc8af710b2c7e2467acd9d (diff) | |
download | rails-4b4075be11753b49b240adbbefead712e83ca1a7.tar.gz rails-4b4075be11753b49b240adbbefead712e83ca1a7.tar.bz2 rails-4b4075be11753b49b240adbbefead712e83ca1a7.zip |
Merge pull request #20708 from sikachu/update-pluck-suggestion
Update .pluck documentation on uniq
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 7108b087f1..df72ba7e9c 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -139,7 +139,7 @@ module ActiveRecord # # SELECT people.id, people.name FROM people # # => [[1, 'David'], [2, 'Jeremy'], [3, 'Jose']] # - # Person.pluck('DISTINCT role') + # Person.uniq.pluck(:role) # # SELECT DISTINCT role FROM people # # => ['admin', 'member', 'guest'] # |