chore(version): add configurations for rails {8.0, 8.1}, ruby 3.4 - #7
Merged
Conversation
- fix latent issue with touch instance_method
adi-herwana-nus
force-pushed
the
adi/upgrade-rails-8-1
branch
from
August 1, 2026 13:29
fbe920c to
d954f60
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Coursemology fork up to Rails 8.0 / 8.1 support, aligned with our sister gems
(
activerecord-userstamp,settings_on_rails), and fixes a latent#touchincompatibility. Thefork keeps its deliberate divergence from upstream (
chaadow) — the customnon_cyclic_saveautosave — which is not changed here.
Full spec suite passes on AR 7.2 / 8.0 / 8.1 (95 examples, 0 failures each).
Changes
#touch(time:)fix (lib/active_record/acts_as/instance_methods.rb)The override was
def touch(*args)and dropped the Rails 6+time:keyword. Rails' own deferredtouch flow (
TouchLater#touch_deferred_attributes, run inbefore_committed!forbelongs_to … touch: true) callstouch(time:), so the override mis-read the{time: …}hash as acolumn name and raised
ActiveModel::MissingAttributeError. Nowdef touch(*args, time: nil),forwarding
time:to both the submodel and the supermodel — mirroring upstream.Rails 8 test matrix
Appraisals— replacerails-7.0/rails-7.1withrails-8.0(~> 8.0.0) andrails-8.1(~> 8.1.0); keeprails-7.2(~> 7.2.0). Gemfiles regenerated..github/workflows/ruby.yml— matrix is now ruby3.1–3.4× activerecord7.2 / 8.0 / 8.1,excluding ruby
3.1on Rails 8 (Rails 8 needs Ruby ≥ 3.2).Gemspec (
active_record-acts_as.gemspec)sqlite3dev dependency~> 1.7→>= 2.1(Rails 8 needs sqlite3 2.x).psych 3.3.2pin — it conflicts with the psych bundled in modern Ruby and blocked thebundle on Ruby 3.3+.
required_ruby_version>= 3.0→>= 3.1;activesupport/activerecord>= 7.0→>= 7.2(drops the untested 7.0/7.1 line, matching the sister gems).polymorphictypo and pointedhomepageat the Coursemology fork.Version
4.0.1→4.1.0(minor: new Rails 8 support + touch fix, no breaking API change).Deliberately NOT changed
Upstream (v5.x) replaced the custom
Autosave/non_cyclic_savemodule with Rails-nativeautosave: trueassociations. This fork'snon_cyclic_saveis an intentional Coursemologydivergence (
f054dff,234301b) and passes cleanly on Rails 8.1, so it is kept as-is. Adoptingupstream's refactor would revert that fix and is out of scope for this PR.
Verification
Suggested commit message