I’m completely new to RoR and don’t know how to exactly achieve the
following task:
With our old web app we switched the database depending on the domain
name so that we could use one application for multiple customers:
Where params[‘dbinfo’] is the variable containing your database name.
this will set the connection to whichever database you need. You won’t
(I don’t think) be able to do this within the model class. You’ll have
to do it in a controller. Although you might want a default setting in
the model class, for console work and such.
/ak
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.