aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2014-03-03 19:23:22 -0800
committerErik Michaels-Ober <sferik@gmail.com>2014-03-03 19:23:22 -0800
commit3413b88a3d6b2b022dfb57e42565446b1e024314 (patch)
treeb3b7f62107f5fb6e76cdf0e90ea78395cacf2188 /activerecord/lib/active_record/associations.rb
parent817fe31196dd59ee31f71ef1740122b6759cf16d (diff)
downloadrails-3413b88a3d6b2b022dfb57e42565446b1e024314.tar.gz
rails-3413b88a3d6b2b022dfb57e42565446b1e024314.tar.bz2
rails-3413b88a3d6b2b022dfb57e42565446b1e024314.zip
Replace map.flatten with flat_map in activerecord
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rw-r--r--activerecord/lib/active_record/associations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 53f7591226..f725356cd9 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -530,8 +530,8 @@ module ActiveRecord
# end
#
# @firm = Firm.first
- # @firm.clients.collect { |c| c.invoices }.flatten # select all invoices for all clients of the firm
- # @firm.invoices # selects all invoices by going through the Client join model
+ # @firm.clients.flat_map { |c| c.invoices } # select all invoices for all clients of the firm
+ # @firm.invoices # selects all invoices by going through the Client join model
#
# Similarly you can go through a +has_one+ association on the join model:
#