Assuming you are using postgresql you might be interested in this
railscast (paid)
http://railscasts.com/episodes/389-multitenancy-with-postgresql
Which takes advantage of being able to have multiple schemas in PostgreSQL.
Be aware though that it will make your initial coding more complicated
and will
have knock-on effects for things like testing etc.
Basically, it will do what you want but it will not be free in terms of
development effort.
I echo other statements that this may be premature optimisation, look at
the railscast, give
it a try yourself and see if the trade-off is good enough for you.
(If you do not want to pay for railscasts then have a look at this gem:
https://github.com/influitive/apartment)
On 04/04/13 16:43, Johan Vauhkonen wrote:
Thanks for posting, I appreciate the feedback.
I'll start with keeping everything within a single database and take
it from there.
You are right Julian in that I am new with RoR and what I've asked for
is advanced.
I'm still curious though how creating databases dynamically would be
done so if it's explained anywhere I'd love to read it!
2013/4/4 Julian Leviston <[email protected]
<mailto:[email protected]>>
On 04/04/2013, at 6:05 PM, Johan Vauhkonen
<[email protected] <mailto:[email protected]>> wrote:
> Thanks for replying, Julian.
>
> Can you point me to any resources that describe how to do it?
>
> I agree that I should not optimize prematurely but what I'm
considering is which is easier,
> to go with dynamically creating databases from the start or to
extract data from the single database to new databases later on?
>
> It's at least something to keep in the back of my mind.
Hi,
You shouldn't attempt to do this if you don't already understand
enough Ruby / Rails to do it yourself.
So, I suggest sticking with what you *can* do first.
This might sound like a cop out, but there's very good reason.
It's very advanced Rails and you really shouldn't attempt
something like this until you understand the basics really well IMHO.
Julian
--
You received this message because you are subscribed to a topic in
the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/rubyonrails-talk/S73DxPeqvy4/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email
to [email protected]
<mailto:rubyonrails-talk%[email protected]>.
To post to this group, send email to
[email protected]
<mailto:[email protected]>.
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].
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].
For more options, visit https://groups.google.com/groups/opt_out.