0

We have a system of two servers. One of them provides HTTP API, other calls it.

I wonder whether the API calling module could be in some way integrated with ActiveRecord to make calls to other server's entities like sending database queries.

I suppose that a custom database provider should be written to achieve the goal.

  1. Is it possible?
  2. Is it worth efforts?
1
  • 1
    It's not exactling what you are describing, but activeresource is a way to use REST API as if it was models - github.com/rails/activeresource Commented May 19, 2014 at 10:07

1 Answer 1

2
  1. You can do this with Active Resource
  2. I prefer the use of ActiveRecord with DB access any time. It is more powerful. But if you only have that API you'll have to go Active Resource.

My advise: Give it a try. But don't stick to it in case you land in some corner.

Sign up to request clarification or add additional context in comments.

1 Comment

I came back Rails after thousand years and discovering features like this is pleasing and brings back lot of good memories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.