caprese 0.3.15 → 0.3.15.1

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: 90a31b1619c636671096dfae4673f785d62489bc
4
- data.tar.gz: 489223b5d6fcac7c29c42a14e52ca5f3ff0ccf18
3
+ metadata.gz: c99e22bf3fabb2970dc78e0c7f48a56b8e1f70ba
4
+ data.tar.gz: 6ee368aece1f5229d00b6ba870efaac87fa47012
5
5
  SHA512:
6
- metadata.gz: f7386bac899aedadabc3186ee8d61463c9924922f878545748754630e3f3061193cd7a4d2834af517b76d64b2a388fd9435061c92d4eacd351adfbf514607efe
7
- data.tar.gz: b51363013f652e033ab7a6012303bb0ef80b6b7e4ea9c476024075c82311805281f8addc331b583d341ebe4de4b7eb165023782fd6e21eb4a645f32d25d54c51
6
+ metadata.gz: d5b825f766ee258b3dc6d24b6a0d7092b76c92ba671a92e1d21e46b6ce8457823cdd8124aa2b9c18227aa78029cf11653166761fddf4b367118d74ab950acb3d
7
+ data.tar.gz: 17f3e18fb17037b3009790d456256926dccb9e9cdc0929b0d2b98aec283aba880786eecfa0e1c275da10dbf9c28678bd0c84623ba6c77f270dc384b55b69d0c5
data/CHANGELOG.md CHANGED
@@ -79,3 +79,7 @@
79
79
  ## 0.3.15
80
80
 
81
81
  * Remove dependency on `ActiveRecord#assign_attributes`
82
+
83
+ ## 0.3.15.1
84
+
85
+ * Allow calling of `assign_attributes` if the record `responds_to` it
@@ -233,7 +233,11 @@ module Caprese
233
233
  )
234
234
  end
235
235
 
236
- attributes.each { |k, v| record.send("#{k}=", v) }
236
+ if record.respond_to?(:assign_attributes)
237
+ record.assign_attributes(attributes)
238
+ else
239
+ attributes.each { |k, v| record.send("#{k}=", v) }
240
+ end
237
241
  end
238
242
 
239
243
  # Gets all the records for a relationship given a relationship data definition
@@ -1,3 +1,3 @@
1
1
  module Caprese
2
- VERSION = '0.3.15'
2
+ VERSION = '0.3.15.1'
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
4
+ version: 0.3.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Landgrebe