ocean-dynamo 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean-dynamo/exceptions.rb +8 -1
- data/lib/ocean-dynamo/persistence.rb +1 -1
- data/lib/ocean-dynamo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74c7e10d51de039a64fc18d60408e3a1a0c9b7f4
|
4
|
+
data.tar.gz: e71adf734d5c6cbde2b2ade2b0b251514c2a9abc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b50cc6aeac65b2a4c1f51e390e0f6d443559507bffcee8f9a13aee347e0e8b06e4aa49d10af2afec8787a6ada8eb82f6902089b68835d07a380444813b8ad0cb
|
7
|
+
data.tar.gz: a12992af3f67eb5d237096e9877506b9ba0b01d101b4c7e2a8e37ad51c8c80c8f07812fc19cc7c3cc61bb70e69c398041a8169a9b8db90f4032e853a4278f88a
|
@@ -16,7 +16,14 @@ module OceanDynamo
|
|
16
16
|
|
17
17
|
class RecordNotSaved < DynamoError; end
|
18
18
|
|
19
|
-
class RecordInvalid < DynamoError
|
19
|
+
class RecordInvalid < DynamoError
|
20
|
+
attr_reader :record # :nodoc:
|
21
|
+
def initialize(record) # :nodoc:
|
22
|
+
@record = record
|
23
|
+
errors = @record.errors.full_messages.join(", ")
|
24
|
+
super(I18n.t(:"#{@record.class.i18n_scope}.errors.messages.record_invalid", :errors => errors, :default => :"errors.messages.record_invalid"))
|
25
|
+
end
|
26
|
+
end
|
20
27
|
|
21
28
|
class RecordNotDestroyed < DynamoError; end
|
22
29
|
|
data/lib/ocean-dynamo/version.rb
CHANGED