flexible_api 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/flexible_api/request_level.rb +1 -1
- data/lib/flexible_api/version.rb +1 -1
- data/lib/flexible_api.rb +3 -1
- metadata +3 -3
data/lib/flexible_api/version.rb
CHANGED
data/lib/flexible_api.rb
CHANGED
@@ -44,7 +44,9 @@ module FlexibleApi
|
|
44
44
|
level = find_level(options[:request_level])
|
45
45
|
|
46
46
|
query = self
|
47
|
-
level.scopes.each
|
47
|
+
level.scopes.each do |s, args|
|
48
|
+
query = args.nil? ? query.send(s) : query = query.send(s, *args)
|
49
|
+
end
|
48
50
|
|
49
51
|
records = query.all(:select => level.select_field.join(', '), :include => level.include_field)
|
50
52
|
records.map { |r| level.receive(r) }
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexible_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Crepezzi
|