EugZol / where_exists

Adds the power of SQL Exists to ActiveRecord
MIT License
110 stars 18 forks source link

Rails 7.1 support #26

Closed cpgo closed 1 year ago

cpgo commented 1 year ago

Just bumped the activerecord version and fixed a minor change related to the default_timezone setter.

Taking a closer look at rails 7.1 release notes but as far as I could find there are no more changes needed.

EugZol commented 1 year ago

@cpgo Please rebase to allow tests to run (updated in the master)

cpgo commented 1 year ago

@EugZol done

cpgo commented 1 year ago

Not exactly sure how to handle this, would something like this work?

if Rails.gem_version < Gem::Version.new("7.1")
  ActiveRecord.default_timezone = :utc
else
  ActiveRecord::Base.default_timezone = :utc
end
EugZol commented 1 year ago

@cpgo sure!

cpgo commented 1 year ago

Changed the version check to look at activerecord version instead of rails. Tests are passing locally, not sure why the CI is breaking, will take a better look later

EugZol commented 1 year ago

Seems it should be the other way around :)

cpgo commented 1 year ago

Yep :upside_down_face: But I see some weird UTF encoding errors on my CI run now

EugZol commented 1 year ago

https://github.com/EugZol/where_exists/pull/28

EugZol commented 1 year ago

@cpgo Pushed the new gem version. Thank you!