api_me 0.3.5 → 0.3.6
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/lib/api_me.rb +5 -1
- data/lib/api_me/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1cf140e09ecf4b5773e21ece939ed3065942283
|
|
4
|
+
data.tar.gz: 0110c77f7a39fe0511872f935c8efafcf4b529ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aadc59fd10b73f2d0e9a4971fe1b3e84c5d8e981e34ec07f898da236039af6c3c47a8944b43ceacabd9e0c247661e477915ba2389a274438a024a873b20e42ce
|
|
7
|
+
data.tar.gz: 54ac80d1afab0a9cae531782be418124a4240fd832c8934245bc9b0006c44d2d9143be164cf06f2de4aeda65551312d4baa01d053f025208cd3e81d7234caea6
|
data/lib/api_me.rb
CHANGED
|
@@ -63,7 +63,7 @@ module ApiMe
|
|
|
63
63
|
# to move to support the jsonapi.org standard closer.
|
|
64
64
|
def index
|
|
65
65
|
ids_filter_hash = params[:ids] ? { ids: params[:ids] } : {}
|
|
66
|
-
@scoped_objects = policy_scope(
|
|
66
|
+
@scoped_objects = policy_scope(resource_scope)
|
|
67
67
|
@filter_objects = filter_klass.new(
|
|
68
68
|
scope: @scoped_objects,
|
|
69
69
|
filters: (filter_params || {}).merge(ids_filter_hash)
|
|
@@ -139,6 +139,10 @@ module ApiMe
|
|
|
139
139
|
self.class.filter_klass
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
+
def resource_scope
|
|
143
|
+
model_klass.all
|
|
144
|
+
end
|
|
145
|
+
|
|
142
146
|
def params_klass_symbol
|
|
143
147
|
model_klass.name.demodulize.underscore.to_sym
|
|
144
148
|
end
|
data/lib/api_me/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: api_me
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sam Clopton
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activerecord
|