Hey everyone!  I have a problem that's been making me a little nuts.
I would like to use RoR for a upcoming project, but if I can't get
past this hiccup I'm
afraid I'll have to use PHP or Java.  Ugh.

The application needs to have a database-per-customer model.  So when
I do a Product.find(:all) I need to make sure i'm connecting to say
acme.products and not xyz_company.products.

I toyed around with the magic_multi_connections gem but I'm having
trouble getting it to work without knowing the connection up front.

In the examples it shows how to connect when you know which db you'll
need ... in their example :Private.

I attempted to look at the code, but there is some meta programming
stuff in there that is beyond my newb level i'm afraid.

The other problem with the magic_multi is that if there are 140
customers then I need 140 modules added in the environment.rb.  That
doesn't sound fun!

If anyone has done something like that and can't get me started I'd be
so grateful!

And please, if I wasn't clear enough, ask me to elaborate rather than
ignoring the post.  I only have a couple more days to decide which
language to use, and i'd really like to go with Ruby and Rails.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to