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
+19-10Lines changed: 19 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,31 +239,34 @@ end
239
239
##### Options
240
240
241
241
The association methods support the following options:
242
+
242
243
*`class_name` - a string specifying the underlying class for the related resource
243
-
*`foreign_key` - the method on the resource used to fetch the related resource. Defaults to `<resource_name>_id` for
244
-
has_one and `<resource_name>_ids` for has_many relationships.
244
+
*`foreign_key` - the method on the resource used to fetch the related resource. Defaults to `<resource_name>_id` for has_one and `<resource_name>_ids` for has_many relationships.
245
245
*`acts_as_set` - allows the entire set of related records to be replaced in one operation. Defaults to false if not set.
246
-
*`relation_name` - the name of the relation to use on the model. A lambda may be provided which allows conditional
247
-
selection of the relation based on the context.
248
-
246
+
*`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.
247
+
*`polymorphic` - set to true to identify `has_one` associations that are polymorphic.
0 commit comments