solidus_core 2.11.5 → 2.11.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/models/spree/base.rb +9 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/testing_support.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d027dc2e99b1a25b1217cd8625f0e375a54fe6c63649080d2b3199360965886b
|
4
|
+
data.tar.gz: 6c6dd38a8b9a117ca95b9608c6b5a1b367fe263b8cd0d152f84dda94c337ac55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6402bc69d1af4cb7fc0f7b41af1086238249a49a9ded3bc2f70471766820a8950c748f416bf795a7f43d5852727981d15d1bd6af9051226f4159f57f69946fc8
|
7
|
+
data.tar.gz: a79e25b3f90d223545db55b96adefc1ac6474bfdce50d738e6d16a621deb69f5ed1f5a46b7f466b7f58d138a9930a9a466680eb181dedf84e8c6278ceaa532cf
|
data/app/models/spree/base.rb
CHANGED
@@ -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,
|
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
|
data/lib/spree/core/version.rb
CHANGED
@@ -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::
|
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.
|
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-
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|