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:
parent
8d7c38b858
commit
0e07a80f5a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue