ru.Bee 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/db/test.db +0 -0
- data/lib/rubee/models/sequel_object.rb +4 -2
- data/lib/rubee.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47aeb2d5c2977b5a43aa3e316548b391ded4310aa5687fc41ccc6526fbf72320
|
|
4
|
+
data.tar.gz: 5b913ab15c67a441e494d5fa79f693e7a4985b787c6fd71dd0655a3e0ed2045c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6c6c022f4427f76b1e6a68caed12382f2881205fc1e90331e1722d97947b92539dfecb0cbb4210b72fb388a5cb2afd3a4646767ea6ec1464c4ba8b2f8217977
|
|
7
|
+
data.tar.gz: '0905fe0144ac5cdb68214afd2dfcb89b60e22a8728fce5e0b910857428fda4be9bd9c8ac062c84bc1b9329cf38316c9234b7672b22d6d52f04d6d1f7bc86e70a'
|
data/lib/db/test.db
CHANGED
|
Binary file
|
|
@@ -243,8 +243,10 @@ module Rubee
|
|
|
243
243
|
def validate_before_persist!
|
|
244
244
|
before(:save, proc { |model| raise Rubee::Validatable::Error, model.errors.to_s }, if: :invalid?)
|
|
245
245
|
before(:update, proc do |model, args|
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
dup__instance = model.dup
|
|
247
|
+
dup__instance.assign_attributes(**args[0])
|
|
248
|
+
if dup__instance.invalid?
|
|
249
|
+
raise Rubee::Validatable::Error, dup__instance.errors.to_s
|
|
248
250
|
end
|
|
249
251
|
end)
|
|
250
252
|
end
|
data/lib/rubee.rb
CHANGED