rest_framework 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rest_framework/VERSION_STAMP +1 -1
- data/lib/rest_framework/serializers.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37a40fca2be23a6fe5fb1f982349ce5dd212644ffe450d979d04c339360b22eb
|
4
|
+
data.tar.gz: 3e036f7150018a46756efc378dacf16321a9394cb9d04d9b4af7220158400cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c4a665ccde25d1c53423c168d1e5849d4ba4b91a2a0bcf6fb1f3b3714b624112d951c06aa84029aeaeb7c3703b30e8c73824688070370b3f0e9e3c3d2fd70ec
|
7
|
+
data.tar.gz: 6a4511553767ed27726a9d12daf0cd46958fe2098566f0daff5c1f9056bfbfa8c26836646b76e3f4a22a1efbea341dc6cb682a04c7c1b5b7635b46cc56548c3a
|
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -31,7 +31,9 @@ class RESTFramework::NativeSerializer < RESTFramework::BaseSerializer
|
|
31
31
|
# Determine model either explicitly, or by inspecting @object or @controller.
|
32
32
|
@model = model
|
33
33
|
@model ||= @object.class if @object.is_a?(ActiveRecord::Base)
|
34
|
-
@model ||= @object[0].class if
|
34
|
+
@model ||= @object[0].class if (
|
35
|
+
@many && @object.is_a?(Enumerable) && @object.is_a?(ActiveRecord::Base)
|
36
|
+
)
|
35
37
|
@model ||= @controller.send(:get_model) if @controller
|
36
38
|
end
|
37
39
|
|