Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Return true from Relationship#inverse? if it is an exact match
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed Sep 2, 2009
1 parent d92779b commit 3b24a93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/dm-core/associations/relationship.rb
Expand Up @@ -491,6 +491,8 @@ def valid_resource?(resource)
# TODO: document
# @api private
def inverse?(other)
return true if @inverse.equal?(other)

other != self &&
kind_of_inverse?(other) &&
cmp_repository?(other, :==, :child) &&
Expand Down

0 comments on commit 3b24a93

Please sign in to comment.