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.
PS: Original pull request - #4421
Allow extending ActiveResource models with custom connections
Closing this for now. As ActiveResource is moved here. you can open this PR on ActiveResource repo.
If you will not be able to do. Just let me know I can open a PR for the same.
I won't be able to re-open this issue for the next few days at least, worried that I will forget. It's such a minor change and has soo many great and important implications. Could you please re-open it?
This PR cannot be merged into master as ActiveResource is moved. Please reopen this for 3-2-stable.
And for master open this here ActiveResource here