You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can safely assume that: Because association :user_comments has no scope, it is the equivalent of calling user.comments, as long as the comments association was loaded without any additional scope (or even equivalent scopes).
The idea is to assign the @target and mark the association as loaded as long as it complies with the necessary requirements. Otherwise, just go ahead and load the association.
The text was updated successfully, but these errors were encountered:
Rails is not smart when the subject is association shortcuts.
Something like:
We can safely assume that: Because association
:user_comments
has no scope, it is the equivalent of callinguser.comments
, as long as thecomments
association was loaded without any additional scope (or even equivalent scopes).The idea is to assign the
@target
and mark the association as loaded as long as it complies with the necessary requirements. Otherwise, just go ahead and load the association.The text was updated successfully, but these errors were encountered: