I've got web application and api.
Web application and api will run on separate servers.
How can I share model classes between them?
You could write a gem with the models you want to share. Then use the gem in both applications.
Another way would be to use the same application on both servers where the application and the api are both implemented. Then one could disable the app/api depend on the domain.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.