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 +4 -4
- data/lib/pragma/rails/controller.rb +5 -1
- data/lib/pragma/rails/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: ef2c94828fb6e2b96aff4786860d5e31abc25bde
|
4
|
+
data.tar.gz: aaef580bc6920a156cbc751066767aea6a05a4a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
data/lib/pragma/rails/version.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2018-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pragma
|