Lukasz Krystkowiak
Lukasz Krystkowiak
It works if I set default_shard earlier ``` shell $ be rails c Loading development environment (Rails 3.2.14) 1.9.3-p429 :001 > ActiveRecord::Base.default_shard = 1 => 1 1.9.3-p429 :002 > ActiveRecord::Base.on_shard(1){...
You're right, it works as expected when it's evaluated inside the block ``` shell 1.9.3-p429 :001 > ActiveRecord::Base.on_shard(1){ Project.where(:id => 1).first } Project Load (0.3ms) SELECT `projects`.* FROM `projects` WHERE...
@singjsong can you share that code? After reading README, my assumption was that this is the default behaviour. imo it'd be good to either add this functionality or update README...