xpose 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xpose/exposed.rb +2 -2
- data/lib/xpose/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: 7f8f64feab9c59cab0b3a944eae235aa1d84397f
|
4
|
+
data.tar.gz: 912d71186527db658cfbb5c1d1d9c888927f4979
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c152123e22eae8917dbf8f2f44fce660e9c7a75afb0aa6b2971e8b4fa4031e4e3b74e4748e4f82ce2681b896e4b9daf14499c2d46fc882c3e2b2fd53ac8333f
|
7
|
+
data.tar.gz: 970e1792b97324131a45b36687c804842de080e449cb4f2e4096577206568c659f79f4e9cc2f648bea4d954fc9315ede9b4afa031a39e118738dc2687fb18f5a
|
data/lib/xpose/exposed.rb
CHANGED
@@ -46,14 +46,14 @@ module Xpose
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def infer_collection
|
49
|
-
klass.send(scope)
|
49
|
+
klass.send(conf.scope)
|
50
50
|
end
|
51
51
|
|
52
52
|
def infer_record
|
53
53
|
source = if instance.respond_to?(conf.pluralized_name)
|
54
54
|
->{ instance.send(conf.pluralized_name) }
|
55
55
|
else
|
56
|
-
->{ klass.send(scope) }
|
56
|
+
->{ klass.send(conf.scope) }
|
57
57
|
end
|
58
58
|
if instance.respond_to?(:params) && instance.params.has_key?(:id)
|
59
59
|
source.call.find(instance.params[:id])
|
data/lib/xpose/version.rb
CHANGED