Skip to content

Commit

Permalink
Fix Rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thom-oman committed Feb 4, 2022
1 parent 2d3065c commit 20be31e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/statesman/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,11 @@ def updated_column_and_timestamp
end

def default_timezone
# Rails 7 deprecates ActiveRecord::Base.default_timezone in favour of ActiveRecord.default_timezone
return ::ActiveRecord.default_timezone if ::ActiveRecord.respond_to?(:default_timezone)
# Rails 7 deprecates ActiveRecord::Base.default_timezone
# in favour of ActiveRecord.default_timezone
if ::ActiveRecord.respond_to?(:default_timezone)
return ::ActiveRecord.default_timezone
end

::ActiveRecord::Base.default_timezone
end
Expand Down

0 comments on commit 20be31e

Please sign in to comment.