Skip to content

Commit

Permalink
Make preference serialization compatible with Rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyadsl committed Dec 6, 2023
1 parent 69b23d7 commit 2ceedca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/lib/spree/preferences/persistable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ module Persistable

included do
include Spree::Preferences::Preferable
serialize :preferences, Hash, coder: YAML
if Rails.gem_version < Gem::Version.new('7.1')
serialize :preferences, Hash, coder: YAML
else
serialize :preferences, type: Hash, coder: YAML
end
after_initialize :initialize_preference_defaults
end

Expand Down

0 comments on commit 2ceedca

Please sign in to comment.