module Userbin
  module UserbinClient
    def userbin
      @userbin ||= Userbin::Client.new(request, response)
    end
  end

  ActiveSupport.on_load(:action_controller) do
    include UserbinClient
  end
end

module Userbin
  module UserbinClient
    def userbin
      @userbin ||= env['userbin'] || Userbin::Client.new(request, response)
    end
  end

  ActiveSupport.on_load(:action_controller) do
    include UserbinClient
  end
end

Use client from env if present
Use client from env if present
