Dynamic database switching

I’ve developped a rails app and am trying to improve the training mode
started to develop for it (its an inward facing rails app BTW). Anyway
the moment i have it set up so while in training mode it flags any
created as ‘training’ using a bitwise op. While changes to orders aren’t
‘real’ in training mode changes to the other tables do in fact take
what i want to do to improve the training mode is to make another
that mirrors all the tables used by the app and have the models
switch to the training database when training mode is turned on. Anyway
do this other than create a whole new set of models and have an if
determine which to call before any model is called on??

thanks in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs