It's called "multitenant" and 2 is the best way to do it :-)
On Jan 18, 2014 6:52 PM, "Kyle Fazzari" <
[email protected]> wrote:

> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/b7c189a6-00c0-49b1-b140-d1ce756f4e04%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BsTbyt5htVixApT%3D%3DSRCpEYEuFQUqLxrrQzGToAQcuBx%3D9m_g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to