Skip to content

Commit

Permalink
oops. should probably double check in the DCL
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Apr 15, 2014
1 parent bd3b28f commit 1cd40d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activerecord/lib/active_record/reflection.rb
Expand Up @@ -207,7 +207,9 @@ def initialize(macro, name, scope, options, active_record)

def association_scope_cache(conn)
key = conn.prepared_statements
@association_scope_cache[key] ||= @scope_lock.synchronize { yield }
@association_scope_cache[key] ||= @scope_lock.synchronize {
@association_scope_cache[key] ||= yield
}
end

# Returns a new, unsaved instance of the associated class. +attributes+ will
Expand Down

0 comments on commit 1cd40d4

Please sign in to comment.