diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-05-16 09:00:26 +0400 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-05-16 09:00:26 +0400 |
commit | 0e07a80f5ab4b1dda1f4a6e373a4ef0b6a933c29 (patch) | |
tree | be9a4cc65066a50441c6685cf66004ee98c602c0 /activerecord/lib | |
parent | 8d7c38b858b0190ac56998f4a4baba250eaf1e4e (diff) | |
download | rails-0e07a80f5ab4b1dda1f4a6e373a4ef0b6a933c29.tar.gz rails-0e07a80f5ab4b1dda1f4a6e373a4ef0b6a933c29.tar.bz2 rails-0e07a80f5ab4b1dda1f4a6e373a4ef0b6a933c29.zip |
Update AR has_one association example
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index c30e8e08b8..68f8bbeb1c 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -543,7 +543,7 @@ module ActiveRecord # end # # @group = Group.first - # @group.users.collect { |u| u.avatar }.flatten # select all avatars for all users in the group + # @group.users.collect { |u| u.avatar }.compact # select all avatars for all users in the group # @group.avatars # selects all avatars by going through the User join model. # # An important caveat with going through +has_one+ or +has_many+ associations on the |