RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in