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
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -541,6 +541,7 @@ The relationship methods (`relationship`, `has_one`, and `has_many`) support the
541
541
*`polymorphic` - set to true to identify relationships that are polymorphic.
542
542
*`relation_name` - the name of the relation to use on the model. A lambda may be provided which allows conditional selection of the relation based on the context.
543
543
*`always_include_linkage_data` - if set to true, the relationship includes linkage data. Defaults to false if not set.
544
+
*`eager_load_on_include` - if set to false, will not include this relationship in join SQL when requested via an include. You usually want to leave this on, but it will break 'relationships' which are not active record, for example if you want to expose a tree using the `ancestry` gem or similar, or the SQL query becomes too large to handle. Defaults to true if not set.
544
545
545
546
`to_one` relationships support the additional option:
546
547
*`foreign_key_on` - defaults to `:self`. To indicate that the foreign key is on the related resource specify `:related`.
0 commit comments