introspective_grape 0.5.2 → 0.5.4

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
  SHA256:
3
- metadata.gz: 1221cfb7bde9b3896a0c11c595c685198a10a88120cb7ad0711baca8b954e7a0
4
- data.tar.gz: 18ef790d77cc390818ea413f04c3ffe0f87a60350a5a7157bb73e66ab9693360
3
+ metadata.gz: 18e335c3487696da5b56e184df1b4ad6495c890e72e2652ee3ef14841a786f94
4
+ data.tar.gz: a18f28ce34addce187ed64af8273c5866c68a63463456dc1acc101a2cab349eb
5
5
  SHA512:
6
- metadata.gz: fdc88a2e154ab024c70c978e553533d79d67b31194ae47e1fa6b923ffa83df585b317aabc2c5159ff9ef63881d235df0ca2cbd9ce28d303213029f6284f8288c
7
- data.tar.gz: f95cddc2dfe36efb3cf54f572d977c10573d658410a876dcf2adba43fb82ea066c1eea53582fa659079ff3211a638edcb0682b156abf040f8a4469bdd330bf87
6
+ metadata.gz: 77b1c4910e315342e2febc3bcca3a0b7b2eb59d1c7b762325a7da6bc60f0f8e69e34ddb2907b2cc76ce0b824367f10d365c7899ffb1f95f3f10444173c9bd3c8
7
+ data.tar.gz: b13267c8b605afa2a4daa6b5620f87e628a105f9271cb8bc437e579bbf3a4f9fe451f4e1935623338c0bd1ec2a205c72275fce27e0b1cf7e2124cc4232553e25
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.5.3 02/07/2022
3
+ ================
4
+
5
+ Fix bug from looking for the ActiveRecord columns_hash on non-ActiveRecord objects.
6
+
2
7
  0.5.2 02/07/2022
3
8
  ================
4
9
 
@@ -403,7 +403,7 @@ module IntrospectiveGrape
403
403
  def param_type(model, field)
404
404
  # Translate from the AR type to the GrapeParam types
405
405
  field = field.to_s
406
- db_type = (model&.columns_hash || {})[field]&.type
406
+ db_type = (model&.try(:columns_hash) || {})[field]&.type
407
407
 
408
408
  # Check if it's a file attachment, look for an override class from the model,
409
409
  # check PG2RUBY, use the database type, or fail over to a String:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IntrospectiveGrape
4
- VERSION = '0.5.2'
4
+ VERSION = '0.5.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: introspective_grape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Buermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails