vidibus-resource 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ class Api::ResourcesController < ApiController
|
|
13
13
|
if instance
|
14
14
|
instance.update_resource_attributes(params[:resource])
|
15
15
|
else
|
16
|
-
attributes = {:
|
16
|
+
attributes = {:resource_uuid => params[:uuid], :resource_attributes => JSON.parse(params[:resource])}
|
17
17
|
attributes[:realm_uuid] = params[:realm] if klass_with_realm?
|
18
18
|
klass.create!(attributes)
|
19
19
|
end
|
@@ -58,7 +58,7 @@ class Api::ResourcesController < ApiController
|
|
58
58
|
|
59
59
|
def instance
|
60
60
|
@instance ||= begin
|
61
|
-
results = klass.
|
61
|
+
results = klass.any_of({:resource_uuid => params[:uuid]}, {:uuid => params[:uuid]})
|
62
62
|
if klass_with_realm?
|
63
63
|
results = results.and(:realm_uuid => params[:realm])
|
64
64
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-15 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|