Share Models between 2 Rails API's (Separate Applications)
api, ruby, ruby-on-rails-3
Solution
You could take a look at:
- Best way to share ActiveRecord models and data between different Rails Apps?
- Two rails apps sharing a model folder
- Shared models between two Rails apps - what is the ideal solution for Workflow?
Problem
I'm currently building 2 API's using Ruby on Rails. One if for reading (finding objects, querying) and the other one is for actually writing to it, involving a kind of complicated process with queues and another API. Both applications require the exact same models and logic inside them. My question is, what's the most common best practice or approach to share models specifications (relationships, scopes, methods) between 2 rails applications? Thank you!