lib/database_slave/relation.rb in database_slave-0.1.2 vs lib/database_slave/relation.rb in database_slave-0.1.3
- old
+ new
@@ -47,11 +47,11 @@
else
raise DatabaseSlave::SlaveConnectionNotExists,
"#{slave_name} is not exists."
end
end
- else
- clone
+ else # using master database if Settings.using_slave == false or nil
+ block_given? ? yield : clone
end
end
alias using using_slave