Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extending ActiveResource models by assigning custom connection #4428

Closed
wants to merge 1 commit into from
Closed

Conversation

dim
Copy link

@dim dim commented Jan 12, 2012

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

PS: Original pull request - #4421

@arunagw
Copy link
Member

arunagw commented Apr 19, 2012

Hey @dim

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.

Cheers,
Arun

@arunagw arunagw closed this Apr 19, 2012
@dim
Copy link
Author

dim commented Apr 19, 2012

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?

@arunagw arunagw reopened this Apr 21, 2012
@arunagw
Copy link
Member

arunagw commented May 18, 2012

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

@arunagw arunagw closed this May 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants