Skip to content

Commit

Permalink
Add notice about performance
Browse files Browse the repository at this point in the history
  • Loading branch information
gussan committed Jan 7, 2015
1 parent 5811bdd commit 3f84bce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_record/turntable/active_record_ext/association.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_records_with_turntable
scope.eager_loading? ||
klass.current_scope ||
klass.default_scopes.any? ||
should_use_shard_key?
should_use_shard_key? # OPTIMIZE: Use bind values if cachable scope

return turntable_scope(scope).limit(1).to_a
end
Expand Down Expand Up @@ -86,7 +86,7 @@ def get_records_with_turntable
scope.eager_loading? ||
klass.current_scope ||
klass.default_scopes.any? ||
should_use_shard_key?
should_use_shard_key? # OPTIMIZE: Use bind values if cachable scope

return turntable_scope(scope).to_a
end
Expand Down

0 comments on commit 3f84bce

Please sign in to comment.