airctiverecord 0.2.2 → 0.2.3
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/airctiverecord/base.rb +2 -2
- data/lib/airctiverecord/validations.rb +1 -1
- data/lib/airctiverecord/version.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: 4092fd949efc404466493a7ef67ef0d56adc3c6a1ec3ef569c927de4f16173c8
|
|
4
|
+
data.tar.gz: 90a348f0cf1bb1dc3761be09711e9c5cf01ca47ff7291eb7b8a5ce0ac1e726f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8a5c41fe48812c79ed09918cb3795ef5532db25a900a1e6878114135e31aafba219f4749385ad5e434a9bdf83f28faf82f0d051413a84a061054b5f47261d43
|
|
7
|
+
data.tar.gz: 482218d21c47bdab629d034a3fd4f41c2b99cb54847efdf0a9baa0e00983f3856bb3de9a05992d7448b459367ec2c298b9e7493cadacddff6c16824b3998b21f
|
data/lib/airctiverecord/base.rb
CHANGED
|
@@ -72,7 +72,7 @@ module AirctiveRecord
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
def save(**options)
|
|
75
|
-
return false unless valid?
|
|
75
|
+
return false unless valid?(new_record? ? :create : :update)
|
|
76
76
|
|
|
77
77
|
run_callbacks :save do
|
|
78
78
|
if new_record?
|
|
@@ -90,7 +90,7 @@ module AirctiveRecord
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def save!(**options)
|
|
93
|
-
raise RecordInvalid, errors.full_messages.join(", ") unless valid?
|
|
93
|
+
raise RecordInvalid, errors.full_messages.join(", ") unless valid?(new_record? ? :create : :update)
|
|
94
94
|
|
|
95
95
|
save(**options)
|
|
96
96
|
end
|