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

Commit

Permalink
Changed usage of !dirty? to clean? in Resource
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed Oct 19, 2009
1 parent dc2bf2f commit 08df3a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dm-core/resource.rb
Expand Up @@ -830,7 +830,7 @@ def child_collections
# @api private
def _create
# Can't create a resource that is not dirty and doesn't have serial keys
return false if new? && !dirty?
return false if new? && clean?

# set defaults for new resource
properties.each do |property|
Expand Down Expand Up @@ -920,7 +920,7 @@ def dirty_children?
# @api private
def cmp?(other, operator)
return false unless key.send(operator, other.key)
return true if repository.send(operator, other.repository) && !dirty? && !other.dirty?
return true if repository.send(operator, other.repository) && clean? && other.clean?

# get all the loaded and non-loaded properties that are not keys,
# since the key comparison was performed earlier
Expand Down

0 comments on commit 08df3a1

Please sign in to comment.