diff options
author | Juanjo Bazán <jjbazan@gmail.com> | 2012-03-27 00:08:31 +0300 |
---|---|---|
committer | Juanjo Bazán <jjbazan@gmail.com> | 2012-03-27 00:08:31 +0300 |
commit | fc25feb341e0ae0cd0c634ccc57446feab18565c (patch) | |
tree | 114de31fe0b564bfe3ca092bb0edcbcdef76b38d /activerecord | |
parent | ddab3df8d15a854e394623b8aee8c43395e77efe (diff) | |
download | rails-fc25feb341e0ae0cd0c634ccc57446feab18565c.tar.gz rails-fc25feb341e0ae0cd0c634ccc57446feab18565c.tar.bz2 rails-fc25feb341e0ae0cd0c634ccc57446feab18565c.zip |
Missing generated query for pluck method.
(and changed the use of true for a more database agnostic example).
Diffstat (limited to 'activerecord')
-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 c770d36a1c..f613014f23 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -174,7 +174,7 @@ module ActiveRecord # # Person.pluck(:id) # SELECT people.id FROM people # Person.uniq.pluck(:role) # SELECT DISTINCT role FROM people - # Person.where(:confirmed => true).limit(5).pluck(:id) + # Person.where(:age => 21).limit(5).pluck(:id) # SELECT people.id FROM people WHERE people.age = 21 LIMIT 5 # def pluck(column_name) key = column_name.to_s.split('.', 2).last |