ruby - Rails - Sharing DB and Models -
i building series of rails applications different use cases, using same database schema. migrations , models created in main app. common approach in rails reuse models in other apps in order not duplicate code?
what you're looking called multitenancy. explanation , numerous ways of implementation aren't suited short answer, since there many different use cases.
there many guides show how this, though, , i've listed couple starting points below.
- railscast - multitenancy postgresql
- railscast - multitenancy scopes
- slideshow - multitenancy rails
- book - multitenancy rails
alternatively, acts tenant gem attempt abstract pain away (mostly).
Comments
Post a Comment