RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: chamnap
Site: chamnapchhorn.blogspot.com
Can anyone explain why we have to do this so that it's threadsafe?
def self.current_id=(id) Thread.current[:tenant_id] = id end def self.current_id Thread.current[:tenant_id] end
How about this?
def self.current_id=(id) @tenent_id = id end def self.current_id @tenent_id end
Upgrade to rails 3.2.2.rc1 will fix this problem. see https://github.com/rails/rails/pull/5101.
Can anyone explain why we have to do this so that it's threadsafe?
How about this?
Upgrade to rails 3.2.2.rc1 will fix this problem.
see https://github.com/rails/rails/pull/5101.