restpack_serializer 0.4.3 → 0.4.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdc99d4a6cda537e16f83f1049af953496771602
|
4
|
+
data.tar.gz: f25a1d10fe8589237ab7106064eb6f8c2df3c930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30df9b3a5d2e9f932e9fcf153f06b65d52b9d0ba70a4e5ab81c1350556511367a6dc11485ebc5108bdb4c8a26620c4387a62d36661a66c4386d301970a892e43
|
7
|
+
data.tar.gz: fab640c675dd711302224fd039f8303ab3ccb0fa4230b99ab8d0e1c8ab986aaf143eb6face0a02292bd4388ad41e46368ecaad8a999b41cb50bb3595e0c4f4e8
|
@@ -46,7 +46,7 @@ module RestPack::Serializer
|
|
46
46
|
filters = {}
|
47
47
|
serializer.filterable_by.each do |filter|
|
48
48
|
[filter, "#{filter}s".to_sym].each do |key|
|
49
|
-
filters[filter] = params[key].split(',') if params[key]
|
49
|
+
filters[filter] = params[key].to_s.split(',') if params[key]
|
50
50
|
end
|
51
51
|
end
|
52
52
|
filters
|
@@ -7,7 +7,7 @@ describe RestPack::Serializer::Resource do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
let(:resource) { MyApp::SongSerializer.resource(params) }
|
10
|
-
let(:params) { { id: @song.id
|
10
|
+
let(:params) { { id: @song.id } }
|
11
11
|
|
12
12
|
it "returns a resource by id" do
|
13
13
|
resource[:songs].count.should == 1
|
@@ -15,7 +15,7 @@ describe RestPack::Serializer::Resource do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe "side-loading" do
|
18
|
-
let(:params) { { id: @song.id
|
18
|
+
let(:params) { { id: @song.id, includes: 'albums' } }
|
19
19
|
|
20
20
|
it "includes side-loaded models" do
|
21
21
|
resource[:albums].count.should == 1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|