1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Update AR has_one association example

This commit is contained in:
Alexey Vakhov 2012-05-16 09:00:26 +04:00
parent 8d7c38b858
commit 0e07a80f5a

View file

@ -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