Skip to content

Commit

Permalink
Fixup deprecation in Rails 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSouthan committed Nov 3, 2023
1 parent a45a827 commit db4a118
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
rails-version:
- "6.1.5"
- "7.0.4"
- "7.1.1"
- "main"
postgres-version: ["9.6", "11", "14"]
exclude:
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
rails-version:
- "6.1.5"
- "7.0.4"
- "7.1.1"
- "main"
mysql-version: ["5.7", "8.0"]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0
3.2.2
6 changes: 5 additions & 1 deletion lib/statesman/adapters/active_record_transition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ module ActiveRecordTransition
extend ActiveSupport::Concern

included do
serialize :metadata, JSON
if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("7.1")
serialize :metadata, coder: JSON
else
serialize :metadata, JSON
end

class_attribute :updated_timestamp_column
self.updated_timestamp_column = DEFAULT_UPDATED_TIMESTAMP_COLUMN
Expand Down

0 comments on commit db4a118

Please sign in to comment.