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 +4 -4
- data/app/controllers/apicasso/crud_controller.rb +4 -6
- data/lib/apicasso/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f52e4133ad57ebbc7d450e671fe81edbc436fc5
|
|
4
|
+
data.tar.gz: fb58e9461e53d8587143547c6bc6c691b0b3f8ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
177
|
+
# A way to SQL-include for current param[:include], only if available
|
|
178
178
|
def included_collection
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
data/lib/apicasso/version.rb
CHANGED