lib/slavery/relation.rb in slavery-1.2.0 vs lib/slavery/relation.rb in slavery-1.3.0
- old
+ new
@@ -1,8 +1,8 @@
class ActiveRecord::Relation
attr_accessor :slavery_target
- # Supports queries like User.on_slave.all
+ # Supports queries like User.on_slave.to_a
def exec_queries_with_slavery
if slavery_target == :slave
Slavery.on_slave { exec_queries_without_slavery }
else
exec_queries_without_slavery