2 Rails的API的(单独的应用程序)之间共享模型 [英] Share Models between 2 Rails API's (Separate Applications)

查看:106
本文介绍了2 Rails的API的(单独的应用程序)之间共享模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在建设2 API的使用Ruby on Rails的。一个,如果读(查找对象,查询),另一种是为实际写入它,涉及一种具有队列和另一个API复杂的过程。这两个应用程序需要精确的同款和逻辑里面他们。

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.

我的问题是,什么是最常见的最佳实践或接近共享模型规范(关系,范围,方法)2轨应用程序之间?

My question is, what's the most common best practice or approach to share models specifications (relationships, scopes, methods) between 2 rails applications?

感谢您!

推荐答案

您可以看看:

  • 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?

这篇关于2 Rails的API的(单独的应用程序)之间共享模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆