Skip to content

Rails 8.1 support - #303

Merged
flavorjones merged 3 commits into
mainfrom
bump-rails-202606
Jun 8, 2026
Merged

Rails 8.1 support#303
flavorjones merged 3 commits into
mainfrom
bump-rails-202606

Conversation

@flavorjones

Copy link
Copy Markdown
Member
  • Matrix test against Rails 8.1 and edge
  • Avoid applying unnecessary patch to Rails edge
  • Bump rails min to >= 8.1.0 (removing support for 8.1 beta versions)

Now that Rails 8.1 has been released, let's not support the betas
anymore.

Also, now that edge rails (8.2 beta) has started removing the need for
the connection to fetch default attributes, let's not apply the
monkeypatch when running edge.
Copilot AI review requested due to automatic review settings June 8, 2026 16:22
@flavorjones
flavorjones merged commit 2eefae3 into main Jun 8, 2026
12 checks passed
@flavorjones
flavorjones deleted the bump-rails-202606 branch June 8, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates activerecord-tenanted to support Rails 8.1 and adds CI coverage for both Rails 8.1 and Rails edge while tightening the gem’s minimum supported Rails version to >= 8.1.0.

Changes:

  • Add an Appraisal-based Rails version matrix (Rails ~> 8.1.0 and rails/main) and run unit/integration CI against each.
  • Make the ActiveRecord Attributes monkey patch conditional to avoid applying it on versions where it’s not needed.
  • Update contributing docs and test scripts to support running tests across the matrix via BUNDLE_GEMFILE/Appraisal.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test_helper.rb Prints Rails version at test start for easier debugging across the matrix.
test/smarty/test/test_helper.rb Prints Rails version at test start for smarty app tests.
lib/active_record/tenanted/railtie.rb Switches Attributes patch application to a conditional apply_patch hook.
lib/active_record/tenanted/patches.rb Adds conditional patch gating logic for the Attributes monkey patch.
gemfiles/rails_edge.gemfile Adds an Appraisal-generated Gemfile for Rails edge.
gemfiles/rails_8_1.gemfile Adds an Appraisal-generated Gemfile for Rails 8.1.
Gemfile.lock Updates locked dependencies and bumps Rails git revision; reflects new dependency constraints.
Gemfile Introduces Appraisal/minitest deps and adjusts Rails dependency placement.
CONTRIBUTING.md Documents how to generate/install appraisals and run tests across the matrix.
bin/test-integration Uses BUNDLE_GEMFILE if set, enabling appraisal-driven integration runs.
Appraisals Defines the Rails 8.1 and Rails edge appraisals.
activerecord-tenanted.gemspec Bumps minimum supported Rails to >= 8.1.0 (dropping 8.1 beta support).
.gitignore Ignores generated appraisal lockfiles.
.github/workflows/ci.yml Adds a matrix over appraisal gemfiles for unit/integration CI; allows edge failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +47 to +51
# This monkey patch isn't necessary after 8.1 removed the need for a connection.
# For details see https://github.com/rails/rails/pull/54348
def needs_patch?
Gem::Requirement.new("~> 8.1.0").satisfied_by?(Gem::Version.new(Rails::VERSION::STRING))
end
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.

2 participants