Sharing models between Rails Apps
I was planning to write 1 article today and another next week, but heck, I had an extra idle hour.
So, in Part 1 and Part 2 I describe a scenario where I had one Rails app and models that I wanted to reuse in a secondary Rails app. The approach I chose was to extract concerns from the first into a Rubygem (supporting proper specs and such) and plug it into the secondary Rails app that, by itself, also had the requirement of having its own database for some models while connecting to the shared database for the shared models.
Post a comment