Standard Way To Create Meta Project

Hello all. I’m not even sure what to call what I’m trying to do, so I’m
calling it a “meta project.” It’s not all that complicated… I just
want
to know what people out there have done in the past.

To explain what I’m talking about, I’ll give a simple example. Say I
create
a simple blog. This blog has two database tables: accounts and articles.
The accounts have admins and publishers (admins can create new accounts,
publishers cannot).

Say my blog is a huge success, and other people want one. Well, I can
always just copy this project and make a new one, but say I want to be
more
efficient and build into my original blog the ability to create new ones
(e.g. blogspot etc.) What is the best way to go about doing that? I can
think of three:

  1. Multiple database connections
  2. Making a new “blogs” table and adding a blog_id to the accounts and
    articles tables so each blog has its own resources. Also create new
    account
    type “super admin” that can create new blogs.
  3. Creating new tables on the fly, e.g. “kyle_accounts” and
    “kyle_articles”

I’m not really a huge fan of any of those options. I don’t really feel
like
Rails was built for (1), (2) feels like the best option although I feel
like things will get hard to keep track of fast, and (3) I actually
don’t
know how to do with MVC.

I’m sure you guys have dealt with this before. Is there a standard way
of
proceeding? Google wasn’t turning anything up… not knowing what to
call
what I’m trying to do doesn’t help.

Thank you!

Kyle

It’s called “multitenant” and 2 is the best way to do it :slight_smile:
On Jan 18, 2014 6:52 PM, “Kyle Fazzari” <

A good answer and bam! all of a sudden, Google results thanks to the
word I was looking for! Thank you :slight_smile: .

Kyle

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs