activerecord_bulkoperation 0.1.0 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2820ff19963204787d8de587378d314ff507bacac18496e04042f6d289109b89
|
4
|
+
data.tar.gz: 6dbb29d24697e3f1e08facc2dc91c243ab34bacbb1f59e1cb5a8e298bb6e5bf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12b2ce79daba44f89ff3cd55a398a305bd37a6be9fb92701f4798f23a09ebc4a47c396fc3d55cada3ec4e7cbafcefb100270b8dcf4904f4e1d75a6aeae13848f
|
7
|
+
data.tar.gz: 8f5cf8c0dec25d8140f97e3c51bb1c9c0e2eabc3e953a6d6186876f5b36bc9581d250de65ac527e972b85f390edfeb99fb1e16656028a4642bb9d63ba6fec6da
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
|
19
19
|
gem.required_ruby_version = ">=2.3"
|
20
20
|
|
21
|
-
gem.add_runtime_dependency "activerecord", ">=4.2"
|
21
|
+
gem.add_runtime_dependency "activerecord", ">=4.2"
|
22
22
|
gem.add_development_dependency "rake"
|
23
23
|
gem.add_development_dependency "mocha"
|
24
24
|
gem.add_development_dependency "minitest"
|
@@ -12,6 +12,14 @@ module ActiveRecord
|
|
12
12
|
record.save_original
|
13
13
|
record
|
14
14
|
end
|
15
|
+
|
16
|
+
alias_method :instantiate_instant_of_without_save_original, :instantiate_instance_of
|
17
|
+
|
18
|
+
def instantiate_instance_of(klass, attributes, column_types = {}, &block)
|
19
|
+
record = instantiate_instant_of_without_save_original(klass, attributes, column_types)
|
20
|
+
record.save_original
|
21
|
+
record
|
22
|
+
end
|
15
23
|
end
|
16
24
|
end
|
17
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_bulkoperation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OSP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '4.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rake
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
143
|
- !ruby/object:Gem::Version
|
150
144
|
version: '0'
|
151
145
|
requirements: []
|
152
|
-
rubygems_version: 3.0.
|
146
|
+
rubygems_version: 3.0.6
|
153
147
|
signing_key:
|
154
148
|
specification_version: 4
|
155
149
|
summary: ''
|