Skip to content

Commit

Permalink
add test scenario to make sure deprecated warning is triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
wendy-clio committed Jun 7, 2024
1 parent a1f4026 commit a668f49
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: 2.7
- name: Install dependencies
run: bundle install
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Ruby 3.0
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: 2.7

- name: Publish to RubyGems
env:
Expand Down
2 changes: 1 addition & 1 deletion lib/jit_preloader/preloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module JitPreloader
class Preloader < ActiveRecord::Associations::Preloader

attr_accessor :records

if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("7.0.0")
def self.attach(records)
new(records: records.dup, associations: nil).tap do |loader|
Expand Down

0 comments on commit a668f49

Please sign in to comment.