Skip to content

Commit 06a1148

Browse files
authored
Merge pull request #6083 from swamp09/fix_preferences_seralize_rails_version_check
Fix preferences serialization compatibility with Rails version check
2 parents 3675af2 + 2bcf076 commit 06a1148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/lib/spree/preferences/persistable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Persistable
88
included do
99
include Spree::Preferences::Preferable
1010

11-
if method(:serialize).parameters.include?([:key, :type]) # Rails 7.1+
11+
if Rails.gem_version >= Gem::Version.new('7.1')
1212
serialize :preferences, type: Hash, coder: YAML
1313
else
1414
serialize :preferences, Hash, coder: YAML

0 commit comments

Comments
 (0)