rails/rails — pull request #4421 by dim (2012-01-12 14:27:54+00:00)
Title: 3 2 stable

...n classes.

APIs aren't always easy, sometimes they want you to do something very special, something there is no hook in ActiveResource::Connection for. Extending connections isn't very slick at the moment, it requires you to overload `ActiveResource::Base.connection` in your models or some dirty patching.

The solution above allows users to assign a connection class in their models, allowing a new dimension of API customisations. I could also think of opportunities for new gems, with Connection classes that use other HTTP libraries, e.g. `activeresource-excon-connection`, etc. These would then be applicable on a model-by-model basis.

dim