caprese 0.3.15.1 → 0.3.16

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
  SHA1:
3
- metadata.gz: c99e22bf3fabb2970dc78e0c7f48a56b8e1f70ba
4
- data.tar.gz: 6ee368aece1f5229d00b6ba870efaac87fa47012
3
+ metadata.gz: fd2cab0612e93540be995aba763d91b63e01af39
4
+ data.tar.gz: e948d190d28ff0fccba730c0488ece215d9590a6
5
5
  SHA512:
6
- metadata.gz: d5b825f766ee258b3dc6d24b6a0d7092b76c92ba671a92e1d21e46b6ce8457823cdd8124aa2b9c18227aa78029cf11653166761fddf4b367118d74ab950acb3d
7
- data.tar.gz: 17f3e18fb17037b3009790d456256926dccb9e9cdc0929b0d2b98aec283aba880786eecfa0e1c275da10dbf9c28678bd0c84623ba6c77f270dc384b55b69d0c5
6
+ metadata.gz: 556a53ef717946b457a69f1e2208eed0527393771805566ca664e01274e751e15cbb3603acad916440561ba67d46a42a51096e174d1f17d9f034706258192f92
7
+ data.tar.gz: 6a2ea38817d702b74d6928c694f909520a9b70c54b213d8bbc813c01f0b0ec7780116887873c5a23ffda146394b60638d7d70d78ca585e294ba329cc07139273
data/CHANGELOG.md CHANGED
@@ -83,3 +83,7 @@
83
83
  ## 0.3.15.1
84
84
 
85
85
  * Allow calling of `assign_attributes` if the record `responds_to` it
86
+
87
+ ## 0.3.16
88
+
89
+ * Only use `Caprese::Record::AssociatedValidator` if `caprese_style_errors`
@@ -26,7 +26,10 @@ module Caprese
26
26
 
27
27
  module ClassMethods
28
28
  def validates_associated(*attr_names)
29
- validates_with AssociatedValidator, _merge_attributes(attr_names)
29
+ validates_with(
30
+ (Caprese::Record.caprese_style_errors ? Caprese::Record : ActiveModel::Validations)::AssociatedValidator,
31
+ _merge_attributes(attr_names)
32
+ )
30
33
  end
31
34
  end
32
35
  end
@@ -1,3 +1,3 @@
1
1
  module Caprese
2
- VERSION = '0.3.15.1'
2
+ VERSION = '0.3.16'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caprese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.15.1
4
+ version: 0.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Landgrebe
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2017-03-10 00:00:00.000000000 Z
13
+ date: 2017-03-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_model_serializers