Skip to content

Commit

Permalink
Merge pull request #6083 from swamp09/fix_preferences_seralize_rails_…
Browse files Browse the repository at this point in the history
…version_check

Fix preferences serialization compatibility with Rails version check
  • Loading branch information
kennyadsl authored Jan 21, 2025
2 parents 3675af2 + 2bcf076 commit 06a1148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/spree/preferences/persistable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Persistable
included do
include Spree::Preferences::Preferable

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

0 comments on commit 06a1148

Please sign in to comment.