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

add multiple database support by allowing injection of a different AR base class #32

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

agrobbin
Copy link
Contributor

What did we change?

Now, you can inject which base class you want to use when setting up the listener. It still defaults to ActiveRecord::Base.

Why are we doing this?

Multiple databases can be easily supported in recent versions of Rails / Active Record, and one way to do that is to have a different abstract Active Record base class with different connection configuration via connected_to.

Closes #22.

How was it tested?

  • Specs
  • Locally
  • Staging

@agrobbin agrobbin force-pushed the multi-db-support-custom-base-class branch from 8303766 to 93885f6 Compare March 21, 2024 13:05
@jmpage jmpage merged commit 7a9237e into ezcater:main Mar 21, 2024
11 checks passed
@agrobbin
Copy link
Contributor Author

Thanks, and HI, @jmpage!

@jmpage
Copy link
Contributor

jmpage commented Mar 21, 2024

Hi to you too, @agrobbin!

@agrobbin
Copy link
Contributor Author

@jmpage I saw there were some other changes that are unreleased (removing support for older versions of Ruby / AR), so I was curious if this will need to wait for other internal updates before it can be released as a new version.

@jmpage
Copy link
Contributor

jmpage commented Mar 22, 2024

@agrobbin once someone approves #33, I'll push the new version.

@jmpage
Copy link
Contributor

jmpage commented Mar 22, 2024

@agrobbin v3.0.0 is now available on rubygems.org

@agrobbin
Copy link
Contributor Author

Thanks @jmpage!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple Database Support?
2 participants