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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f02467ba044729f1a4196b520ae35b90157cd09b8de8a41db53673f74bd24481
4
- data.tar.gz: f893737770e749558b124154c81d3400b2f7a6defcfccee7164ad7fc667ba797
3
+ metadata.gz: 4da1ca43da439ca2634d69307669020e77ac7349c3ab8fc61ac0386a6e980715
4
+ data.tar.gz: 2f88d2308bfb76be228eebdb7e6ecd1df5f63a4c8b751f0d41a289e5a30cfb1a
5
5
  SHA512:
6
- metadata.gz: 8b3357e13f694420ebc0e58018fe247ed28cf7cab32345b24208c49751e119561a4413f11bb39cf80bab99f54cbfbd818dbcd54a4f6e801c16dd9cf22f7c5392
7
- data.tar.gz: 9679bf7228ac2156f6704a4ac457db2d39f8837d428a04607bbb9a09e07dfeaa843ff91d929e04690ef6c1b65e1d2b318b4a98cc4beaba125f48e16659b82c16
6
+ metadata.gz: 4dd14031ebb8949192d31cfcbcc48609a7670c023d3968e12ee32a7db686081bdc67390cb6538519eb79d1ba3f4cc4ee1ef9f5496d4f06991fae1ee24eb9bb8f
7
+ data.tar.gz: 32e2ae5a3c1a5286cb299039de8b435a919e0618d9251904b3c0c32b439601da7847d9d33e2f039d56831621df4692013d345b8ac946f2c7c59a99d927f53f85
@@ -15,9 +15,17 @@ module StoreModel
15
15
  end
16
16
  end
17
17
 
18
- def write_attribute(*)
19
- super.tap do |value|
20
- assign_parent_to_store_model_relation(value)
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
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StoreModel # :nodoc:
4
- VERSION = "0.13.0"
4
+ VERSION = "1.0.0"
5
5
  end
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.13.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-02-11 00:00:00.000000000 Z
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.0.3.1
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: []