Using 2 database into a single RoR application

Hi everybody,

I’m trying to convert to Ror one of my old ASP classic project.

the website is an e-commerce with a community

In this website I have 2 separate database for products/BI and for user
generated content so is easyer to develop BI without touching the “user”
database.

Pubblishing a new BI or a mayor database update is just matter of
drop/restore
the full BI database.

Also we can keep our development environment and staging environment on
sync with user generated content just by dropping the user database and
restoring a backup from production.

How can I make this in Ror ?

thanks

You can tell rails to use different databases on a per-model basis. Just
put a

establish_connection :dbname

in the model class, and make sure there’s a definition for ‘dbname’ in
config/database.yml.

steve

You will need to restart the Rails application that is running in
production mode if you change the schema.

On Sep 16, 2:31 pm, “Simone R.” [email protected]

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