upframework 0.2.92 → 0.3.0

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: 1c90e7825b44e876ea03889e93bc696cdd1e4727403dfb35dc56d803413a3d8d
4
- data.tar.gz: 3e527a4bd7b559ceeb1259806412f261b226a9e6634eeda3eae26c8f0ccee0c8
3
+ metadata.gz: fda63a549c9735a9a31301a41873c22fb350fa486ca3acb508b08ac7b29a2140
4
+ data.tar.gz: e2a324a2c405d0becd5445389ac0777430d8e1dfcbac1933c6ab475b07636f0c
5
5
  SHA512:
6
- metadata.gz: 7df9f0286988dbf67a908615e73f133e6bece3d60995fba5993cabe8e9693027e546c1e481991d2f95c96cb0a074cc26e479a2246919bf1ea8cfacc009f2dc6a
7
- data.tar.gz: e121b700a3736ff3dad84682e7ce512aa3bfd4f783e22ad10e609fd3050f0be107fda21c987fdfe805a3de1bb8da661adadcb8b5a2b510944b7fa75e1e0d32d0
6
+ metadata.gz: 4b7f31acec08d2d3a0c06d86656cebcf229e4d6813e664eae95d97923f5cd8a48b14a2b0b1721e242f3a5a179a4086844307180772ff423e0826f5169fca813c
7
+ data.tar.gz: d5cbeb810d372e6982515f13e2507e512fc60e0504f7438bf97da90776cb9a15d35b70d45b6c65bee69e1de0b610fbcbbce77044b1178a2c8b1435e2a9f775e7
@@ -44,7 +44,15 @@ module Upframework
44
44
  serializer_klass = "#{resource_klass}Serializer".constantize
45
45
 
46
46
  relations = serializer_klass.default_includes
47
- relations.concat(Array(includes).map(&:to_sym)) if includes
47
+
48
+ includes =
49
+ if includes.is_a? String
50
+ includes.split(",").map(&:underscore).map(&:to_sym)
51
+ else
52
+ Array(includes).map(&:to_sym)
53
+ end
54
+
55
+ relations.concat(includes.compact)
48
56
 
49
57
  serializer_klass.new(resource, include: relations, format: format, current_controller: self, **compound_opts).serializable_hash
50
58
  end
@@ -1,3 +1,3 @@
1
1
  module Upframework
2
- VERSION = '0.2.92'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.92
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jude_cali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-03 00:00:00.000000000 Z
11
+ date: 2020-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails