Permalink
Browse files

make syntax of select.map(&:field) same as pluck

The shortcut ampersand syntax of `select.map(&:field)` is same thing as `.plunk(:field)`. document that
  • Loading branch information...
1 parent 8659212 commit e3e4fa1f6504ba27200c25558462dd2ba6c1fcd3 @gaurish gaurish committed Nov 8, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 guides/source/active_record_querying.md
@@ -1364,6 +1364,8 @@ Client.pluck(:id, :name)
```ruby
Client.select(:id).map { |c| c.id }
# or
+Client.select(:id).map(&:id)
+# or
Client.select(:id).map { |c| [c.id, c.name] }
```

0 comments on commit e3e4fa1

Please sign in to comment.