activeshepherd 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_shepherd/methods/apply_changes.rb +2 -2
- data/lib/active_shepherd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2be7d44a796133c6bc1525d61525bfb8fd41b2a7
|
4
|
+
data.tar.gz: 855223e0395a13e684e74312b0f321e64f3c5dd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77a062d057ef8fda104caada5cb0a5cc305235c5293e494da38d4abe401b487678d104912d07e1157124522f8dcfa354f7c383b192440f527372f5a4d412dc87
|
7
|
+
data.tar.gz: a5be04b9739418db11ca255759f4a309c2d208ceb2017bca5b244ebabc34edcc08a4cbf2d6c16729c0980bc38988820807ea8e16f14a8a5853054665ea4d676e
|
@@ -12,7 +12,7 @@ class ActiveShepherd::Methods::ApplyChanges < ActiveShepherd::ApplyMethod
|
|
12
12
|
after = aggregate.deserialize_value(attribute_name, after)
|
13
13
|
|
14
14
|
unless current_value == before
|
15
|
-
raise ::ActiveShepherd::
|
15
|
+
raise ::ActiveShepherd::BadChangeError, "Expecting "\
|
16
16
|
"`#{attribute_name} to be `#{before.inspect}', not "\
|
17
17
|
"`#{current_value.inspect}'"
|
18
18
|
end
|
@@ -42,7 +42,7 @@ private
|
|
42
42
|
|
43
43
|
associated_model = association[index]
|
44
44
|
if associated_model.nil?
|
45
|
-
raise ::ActiveShepherd::
|
45
|
+
raise ::ActiveShepherd::BadChangeError,
|
46
46
|
"Can't find record ##{index}"
|
47
47
|
end
|
48
48
|
self.class.apply_changes recurse(associated_model, reflection.foreign_key),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeshepherd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ntl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|