store_model 0.13.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/store_model/ext/active_model/attributes.rb +11 -3
- data/lib/store_model/model.rb +1 -0
- data/lib/store_model/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4da1ca43da439ca2634d69307669020e77ac7349c3ab8fc61ac0386a6e980715
|
4
|
+
data.tar.gz: 2f88d2308bfb76be228eebdb7e6ecd1df5f63a4c8b751f0d41a289e5a30cfb1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd14031ebb8949192d31cfcbcc48609a7670c023d3968e12ee32a7db686081bdc67390cb6538519eb79d1ba3f4cc4ee1ef9f5496d4f06991fae1ee24eb9bb8f
|
7
|
+
data.tar.gz: 32e2ae5a3c1a5286cb299039de8b435a919e0618d9251904b3c0c32b439601da7847d9d33e2f039d56831621df4692013d345b8ac946f2c7c59a99d927f53f85
|
@@ -15,9 +15,17 @@ module StoreModel
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
if Rails::VERSION::MAJOR >= 7
|
19
|
+
def _write_attribute(*)
|
20
|
+
super.tap do |value|
|
21
|
+
assign_parent_to_store_model_relation(value)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
else
|
25
|
+
def write_attribute(*)
|
26
|
+
super.tap do |value|
|
27
|
+
assign_parent_to_store_model_relation(value)
|
28
|
+
end
|
21
29
|
end
|
22
30
|
end
|
23
31
|
end
|
data/lib/store_model/model.rb
CHANGED
@@ -11,6 +11,7 @@ module StoreModel
|
|
11
11
|
def self.included(base) # :nodoc:
|
12
12
|
base.include ActiveModel::Model
|
13
13
|
base.include ActiveModel::Attributes
|
14
|
+
base.include ActiveRecord::AttributeMethods::BeforeTypeCast
|
14
15
|
base.include ActiveModel::AttributeMethods
|
15
16
|
base.include StoreModel::NestedAttributes
|
16
17
|
|
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: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DmitryTsepelev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -120,7 +120,7 @@ homepage: https://github.com/DmitryTsepelev/store_model
|
|
120
120
|
licenses:
|
121
121
|
- MIT
|
122
122
|
metadata: {}
|
123
|
-
post_install_message:
|
123
|
+
post_install_message:
|
124
124
|
rdoc_options: []
|
125
125
|
require_paths:
|
126
126
|
- lib
|
@@ -135,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
139
|
-
signing_key:
|
138
|
+
rubygems_version: 3.3.3
|
139
|
+
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Gem for working with JSON-backed attributes as ActiveRecord models
|
142
142
|
test_files: []
|