0

I am new to Rails and need some help on this! Can we connect to a local database and production database simultaneously after the project has been deployed to production ??

for example : My application when deployed to production, with a click of a button on the page, it should toggle between the usage of production database and the user's local database.Is that possible ?

Thanks!

Vinay
  • 237
  • 2
  • 8
  • 17

1 Answers1

0

You can do this, there are some clues in the comments here:

And a more comprehensive guide here:

But it's a bit of a faff - why do you need to do this, maybe there is another way to achieve what you want?

Community
  • 1
  • 1
Matt
  • 13,948
  • 6
  • 44
  • 68
  • Thanks for the quick reply.I want my application to be pluggable.... like when a user wants to use his local database specific to his need. I should be able to let the user do that... – Vinay Jun 10 '13 at 16:21
  • How do I disconnect from production database while connecting to local database (because while querying, I think the app will try to fetch entries from both the connections?)and then when I press some button how do i connect back to production database again. Thanks a lot for the information! – Vinay Jun 10 '13 at 19:15