diff --git a/lib/dm-core/collection.rb b/lib/dm-core/collection.rb index b00a7daf..a6ec95d3 100644 --- a/lib/dm-core/collection.rb +++ b/lib/dm-core/collection.rb @@ -65,9 +65,9 @@ def model # @return [self] # # @api public - def reload(other_query = nil) + def reload(other_query = Undefined) query = self.query - query = other_query.nil? ? query.dup : query.merge(other_query) + query = other_query.equal?(Undefined) ? query.dup : query.merge(other_query) # make sure the Identity Map contains all the existing resources identity_map = repository.identity_map(model)