pragma-rails 1.2.3 → 1.2.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
  SHA1:
3
- metadata.gz: 1cd8c438cabbdba12f245c111bcdc2b4e9f0a5a6
4
- data.tar.gz: 730aa08eb9e8d25c70ad9aa07f9fbce13074ea62
3
+ metadata.gz: ef2c94828fb6e2b96aff4786860d5e31abc25bde
4
+ data.tar.gz: aaef580bc6920a156cbc751066767aea6a05a4a1
5
5
  SHA512:
6
- metadata.gz: 0d188d5bfa556f0c4c58f6acd828d67a21b75cb235debd4b3d11bf39aaebf7d208e07f435a643d67f50b81ee8dad64914fac467192dec9f0310d9de49389c5bf
7
- data.tar.gz: ace4bdec5602c30a4ec48e7c921f925d039663020a13d01bda1b1695c738491e885755ed932b5469ea5c06529ef7ff9f7706dcde3f1ed928921aaa346ae403e2
6
+ metadata.gz: e23f4b1a3dc5bac1cc06d9ffa4319c3b3a1ba419547a37426357626ef6166513e87e21f28aab9665fe544fb933abd9da58a5575145a940186f0a9340898d2e07
7
+ data.tar.gz: 6be0675127df08306c7cad8dbf75ea49ccbdd0eda49a643e3ed46810b2a5d022f4a983190dee328f68764f220b6d2d5f0bff3af70d3607f511d78f7ec2bf368f
@@ -74,7 +74,11 @@ module Pragma
74
74
  resource_to_json(instance)
75
75
  end
76
76
  else
77
- resource.method(:to_hash).arity.zero? ? resource.to_hash : resource.to_hash(options)
77
+ if resource.respond_to?(:to_hash)
78
+ resource.method(:to_hash).arity.zero? ? resource.to_hash : resource.to_hash(options)
79
+ else
80
+ resource.as_json(options)
81
+ end
78
82
  end
79
83
  end
80
84
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Pragma
3
3
  module Rails
4
- VERSION = '1.2.3'
4
+ VERSION = '1.2.4'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragma-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-29 00:00:00.000000000 Z
11
+ date: 2018-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pragma