store_model 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/store_model/configuration.rb +7 -1
- data/lib/store_model/railtie.rb +4 -2
- data/lib/store_model/version.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: 738610a630b9d60da6e855965f5f2ecfee4bb1acd68d89b8f012645f62930591
|
4
|
+
data.tar.gz: 512a83d32803641b177f9bd385f7c543595492851e96f296f7257fcc6ac8275e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef1e9fab0a057edc2322593fb17595e4517c1c10c87b726c02f84deb1aabbd73a37949c885987cf9f342892d2df17675b4e18839a82f0d6153c57797930acb8
|
7
|
+
data.tar.gz: 150c9d6dc291512309046c9049316c3ad9f2784e0989751ae406dcc6924a43973b88c2c606a8645c6a25d9243816d7f0dc7470ffbe02512837db4862f783b988
|
data/README.md
CHANGED
@@ -15,12 +15,18 @@ module StoreModel
|
|
15
15
|
# @return [Boolean]
|
16
16
|
attr_accessor :serialize_unknown_attributes
|
17
17
|
|
18
|
-
# Controls if the result of `as_json` will serialize enum
|
18
|
+
# Controls if the result of `as_json` will serialize enum fields using `as_json`
|
19
19
|
# @return [Boolean]
|
20
20
|
attr_accessor :serialize_enums_using_as_json
|
21
21
|
|
22
|
+
# Controls if parent tracking functionality is enabled.
|
23
|
+
# Default: true
|
24
|
+
# @return [Boolean]
|
25
|
+
attr_accessor :enable_parent_assignment
|
26
|
+
|
22
27
|
def initialize
|
23
28
|
@serialize_unknown_attributes = true
|
29
|
+
@enable_parent_assignment = true
|
24
30
|
end
|
25
31
|
end
|
26
32
|
end
|
data/lib/store_model/railtie.rb
CHANGED
@@ -7,8 +7,10 @@ module StoreModel # :nodoc:
|
|
7
7
|
class Railtie < Rails::Railtie # :nodoc:
|
8
8
|
config.to_prepare do |_app|
|
9
9
|
ActiveSupport.on_load(:active_record) do
|
10
|
-
|
11
|
-
|
10
|
+
if StoreModel.config.enable_parent_assignment
|
11
|
+
ActiveModel::Attributes.prepend(Attributes)
|
12
|
+
prepend(Base)
|
13
|
+
end
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
data/lib/store_model/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: store_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|