Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #17 from zonecheung/master

Error when destroying a record with has_one association
  • Loading branch information...
commit d10f247181f7c6ceb36d0be0649469461854004d 2 parents cfa3c13 + 7b6b4c2
@orslumen authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/record_cache/datastore/active_record_31.rb
View
2  lib/record_cache/datastore/active_record_31.rb
@@ -351,7 +351,7 @@ module InstanceMethods
def delete_with_record_cache(method = options[:dependent])
# invalidate :id cache for all record
if load_target
- target.class.record_cache.invalidate(record.id) if target.class.record_cache? unless target.new_record?
+ target.class.record_cache.invalidate(target.id) if target.class.record_cache? unless target.new_record?
end
# invalidate the referenced class for the attribute/value pair on the index cache
@reflection.klass.record_cache.invalidate(@reflection.foreign_key.to_sym, @owner.id) if @reflection.klass.record_cache?
Please sign in to comment.
Something went wrong with that request. Please try again.