tchandy/octopus — Issue #82: conn.is_a?(Octopus::Proxy) is false
Author: SpringMT
Created: 2012-03-09 05:37:15+00:00
State: open

When use Octopus.using(:slave_db), conn.is_a?(Octopus::Proxy) is false.

lib/octopus.rb line 91 〜
def self.using(shard, &block)
conn = ActiveRecord::Base.connection

if conn.is_a?(Octopus::Proxy) ← FALSE!!!
conn.run_queries_on_shard(shard, &block)
else
yield
end
end

So the app don't use slave_db, use master;

I use rails 3.2.1 and activerecord 3.2.1

Any ideas?
Any help would be much appreciated!