Rails Engine Thread Safety - ActiveResource
问题 My Rails 3.1 app uses an engine and I want to know if access to this engine is threadsafe. I have /lib/mymodule.rb in the engine and it looks something like this: module MyModule def self.my_method() begin data = WebResource.find(:all) # Where WebResource < ActiveResource::Base rescue data = nil end return data end end Then in my views/controllers, I call this method like this: MyModule::WebResource.headers[:some_id] = cookies[:some_id] MyModule::my_method() In my main app, I have the