title: How to use celluloid and ActiveRecord
body: <p>I am using celluloid to perform some jobs in the background, some of the jobs are using the DB and for that I use the below code in a cell(actor): </p>
  
  <pre><code>ActiveRecord::Base.connection_pool.with_connection do
    User.find(123)
  end
  </code></pre>
  
  <p>In some cases I have some services, which are queuing the DB but with some other logic in them. Can I send them to <code>...with_connection</code> or I need to wrap the call inside? Is there a better way of doing all this?</p>
  
  <pre><code>ActiveRecord::Base.connection_pool.with_connection do
    SomeService.new(params).get_records
  end
  
  class SomeService
    def initialise(param)
      @params = params
    end
  
    def get_records
       some_logic
       ServicePersistenceModel.where(id: prams.id)
    end
  end
  </code></pre>