solidus_core 2.11.5 → 2.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e525e5e27176da6331f5bce6a0075f2c06f2da77f9d8aad9d78a861a121219c
4
- data.tar.gz: f828d4522d8c58822fc71daa609b7411102dbdcf55e7abb4f582102c23ddbfbd
3
+ metadata.gz: d027dc2e99b1a25b1217cd8625f0e375a54fe6c63649080d2b3199360965886b
4
+ data.tar.gz: 6c6dd38a8b9a117ca95b9608c6b5a1b367fe263b8cd0d152f84dda94c337ac55
5
5
  SHA512:
6
- metadata.gz: ca14ba69f5a7347fd1bc88d8d209e4ffbe2d4a9419fd257f036391d55581250569ac66683a6b5c27a1342f4b5f8120b0483ba16538f8107ded796bda44551c6d
7
- data.tar.gz: f36de4fb9dc7addc88b586277f111b854dbbcfba3d586d52a62c2c4aaddc19e6bf536b74151a461df11566d3609df6fbc60889e70b9bbded67dc6ae740ae64dc
6
+ metadata.gz: 6402bc69d1af4cb7fc0f7b41af1086238249a49a9ded3bc2f70471766820a8950c748f416bf795a7f43d5852727981d15d1bd6af9051226f4159f57f69946fc8
7
+ data.tar.gz: a79e25b3f90d223545db55b96adefc1ac6474bfdce50d738e6d16a621deb69f5ed1f5a46b7f466b7f58d138a9930a9a466680eb181dedf84e8c6278ceaa532cf
@@ -5,6 +5,10 @@ class Spree::Base < ActiveRecord::Base
5
5
  include Spree::Core::Permalinks
6
6
  include Spree::RansackableAttributes
7
7
 
8
+ def preferences
9
+ read_attribute(:preferences) || self.class.preferences_coder_class.new
10
+ end
11
+
8
12
  def initialize_preference_defaults
9
13
  if has_attribute?(:preferences)
10
14
  self.preferences = default_preferences.merge(preferences)
@@ -16,7 +20,7 @@ class Spree::Base < ActiveRecord::Base
16
20
  def self.preference(*args)
17
21
  # after_initialize can be called multiple times with the same symbol, it
18
22
  # will only be called once on initialization.
19
- serialize :preferences, Hash
23
+ serialize :preferences, preferences_coder_class
20
24
  after_initialize :initialize_preference_defaults
21
25
  super
22
26
  end
@@ -31,6 +35,10 @@ class Spree::Base < ActiveRecord::Base
31
35
  end
32
36
  end
33
37
 
38
+ def self.preferences_coder_class
39
+ Hash
40
+ end
41
+
34
42
  self.abstract_class = true
35
43
 
36
44
  # Provides a scope that should be included any time products
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "2.11.5"
4
+ VERSION = "2.11.6"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
@@ -25,7 +25,7 @@ module Spree
25
25
  factory_bot_paths: "Spree::TestingSupport::FactoryBot.definition_file_paths",
26
26
  check_factory_bot_version: "Spree::TestingSupport::FactoryBot.check_version",
27
27
  load_all_factories: "Spree::TestingSupport::FactoryBot.add_paths_and_load!",
28
- deprecator: Spree::Deprecator
28
+ deprecator: Spree::Deprecation
29
29
  )
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.5
4
+ version: 2.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-10 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer