You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been using this gem in production for some time now without any issues. However, every time we add a new shard in database.yml we have to redeploy our service. I was curious if its possible to switch connection to a database which doesn't exists in database.yml by directly passing in the database name something like below?
ActiveRecord::Base.on_shard(database_name)
I have seen other solutions online which suggests to use establish_connection in application_controller before_action but before implementing that I would like to know if this gem already supports this functionality or if it could be extended to support it. I am willing to contribute PR if someone can provide little guidance in the right direction.
Thanks!
The text was updated successfully, but these errors were encountered:
We have been using this gem in production for some time now without any issues. However, every time we add a new shard in database.yml we have to redeploy our service. I was curious if its possible to switch connection to a database which doesn't exists in database.yml by directly passing in the database name something like below?
ActiveRecord::Base.on_shard(database_name)
I have seen other solutions online which suggests to use
establish_connection
in application_controller before_action but before implementing that I would like to know if this gem already supports this functionality or if it could be extended to support it. I am willing to contribute PR if someone can provide little guidance in the right direction.Thanks!
The text was updated successfully, but these errors were encountered: