I am building a sinatra app that will use Highrise CRM gem to access Highrise data. This gem is based on ActiveResource class. I want to set site, user fields for every request.
I've been playing a lot with setting site option dynamically during runtime and the only solution I have found which will not lead to race condition.
site
class Runner def self.new(site) Class.new(ActiveResource::Base) do self.site = site self.element_name = 'runner' # your methods here end.new end end