apicasso 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16f579b7e6f224222ad10d35efc087d99c2ff04e
4
- data.tar.gz: b31b8cf77845d01fd00885c1a4f516f2d582d902
3
+ metadata.gz: 7f52e4133ad57ebbc7d450e671fe81edbc436fc5
4
+ data.tar.gz: fb58e9461e53d8587143547c6bc6c691b0b3f8ea
5
5
  SHA512:
6
- metadata.gz: 6722df9eca40fb953717fbe36039f810b76b0d11c16c71002fa7533243aa7f8d1e14f4e3526c5f8d23d2c09e16ca254b6c1935540298d1b2acc7ac816f054215
7
- data.tar.gz: f5c6f9d92296e40ef83207552f489a47e25805ae03016e1e79da3e8ffb0475a225fa2fbd95873c1035ead75884f2ebfc4ce06efaaa5d202f1891e47358ea7637
6
+ metadata.gz: '09dee995fa7fca189fa57640d66b5188876c44895756e2a7c6d126448cbc6b47ffe24002dd726fdf8f6e66bbe076e53044b20ac3978cf4a3fcc80c62a8666fcc'
7
+ data.tar.gz: 68348d492b7357a5ec85d20b928cebc7283aacb386ccf816cce7142bbb2df0400b49c4f994b0b832b7aacf776db987335f8a434b5f26f3e3cef728a39f3e798c
@@ -174,13 +174,11 @@ module Apicasso
174
174
  @records = JSON.parse(included_collection.to_json(include: parsed_include))
175
175
  end
176
176
 
177
- # A way to SQL-include if available for current param[:include]
177
+ # A way to SQL-include for current param[:include], only if available
178
178
  def included_collection
179
- if @records.try(:includes, parsed_include).present?
180
- @records.includes(parsed_include)
181
- else
182
- @records
183
- end
179
+ @records.includes(parsed_include)
180
+ rescue ActiveRecord::AssociationNotFoundError
181
+ @records
184
182
  end
185
183
 
186
184
  # Returns the collection checking if it needs pagination
@@ -1,3 +1,3 @@
1
1
  module Apicasso
2
- VERSION = '0.2.10'
2
+ VERSION = '0.2.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apicasso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Bellincanta