Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Compatibility with Discourse on Rails 6.1 #21

Merged
merged 1 commit into from Apr 21, 2021

Conversation

OsamaSayegh
Copy link
Member

Should be merged after: discourse/discourse#12688.


config.merge!(
replica_host: 'localhost',
replica_port: 1111
)
ActiveRecord::Base.connection.disconnect!
ActiveRecord::Base.establish_connection(config)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big fan of this, but Rails 6.1 freezes the connection config hash. I could cheat and use instance_variable_set to change the underlying hash object inside db_config, but that doesn't seem like a great solution either.

@OsamaSayegh OsamaSayegh merged commit 0d47e63 into main Apr 21, 2021
@OsamaSayegh OsamaSayegh deleted the dev/compatibility-with-rails-6.1.3 branch April 21, 2021 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants