[Rails] Re: select database after login
I'm thinking it might be a multi tenant, but with the same initial UI. That's one possible use case.
Dheeraj Kumar
On Monday 19 December 2011 at 5:09 AM, BirdieTracker wrote:
You may be able to set up an abstract model with two child models inwhich each child uses a different database. One way to connect todifferent databases is by using the USE_DB gem. Once your user islogged in, you can set something in their session then somehow directthem to one database or the other by changing the value of the use_dbcall in the model.Can I ask why you have two identically structured databases withdifferent data for login? I'm interested in learning about the usecase.On Dec 18, 1:53 pm, Rike Hase <li...@ruby-forum.com> wrote:Hi all,is it possible to select the database after the user login?I need something like this:1. Login screen where the user types in his username and password2. Searching for the username in two databases (which have the samestructure)3. if username is found in on of the two databases, select this databasefor the whole sessionI hope you understand what I mean.Thanks for your responds!--Posted viahttp://www.ruby-forum.com/.--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 rubyonrails-talk@googlegroups.com.To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home