ActiveRecord::Base.connection_proxy.with_master do not work #5

Open
cyruscavalcante opened this Issue Jul 8, 2010 · 1 comment

Projects

None yet

2 participants

@cyruscavalcante

I try use this code below in my controller

around_filter(:only => [:create,:update]) { |c,a| ActiveRecord::Base.connection_proxy.with_master { a.call } }

and receive this error:
NoMethodError (undefined method `conection_proxy' for ActiveRecord::Base:Class):

I need change conection of 2 actions in my controller for read just at master. How I do?

@anoiaque

Which rails version do you use?
It works fine with rails 3.0.+ but break with rails 3.1.+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment