diff --git a/core/lib/rom/relation.rb b/core/lib/rom/relation.rb index 5cd5ec3ed..658d49c18 100644 --- a/core/lib/rom/relation.rb +++ b/core/lib/rom/relation.rb @@ -225,15 +225,27 @@ def each end end - # Combine with other relations + # Combine with other relations using configured associations # # @overload combine(*associations) - # Composes relations using configured associations - # # @example # users.combine(:tasks, :posts) + # # @param *associations [Array] A list of association names # + # @overload combine(*associations, **nested_associations) + # @example + # users.combine(:tasks, posts: :authors) + # + # @param *associations [Array] A list of association names + # @param *nested_associations [Hash] A hash with nested association names + # + # @overload combine(associations) + # @example + # users.combine(posts: [:authors, reviews: [:tags, comments: :author]) + # + # @param *associations [Hash] A hash with nested association names + # # @return [Relation] # # @api public