vidibus-resource 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,11 +8,14 @@ module Vidibus::Resource
|
|
8
8
|
|
9
9
|
included do
|
10
10
|
field :resource_attributes, :type => Hash, :default => {}
|
11
|
-
field :
|
11
|
+
field :resource_uuid
|
12
12
|
field :uuid
|
13
|
-
|
13
|
+
|
14
|
+
index :resource_uuid
|
14
15
|
index :uuid
|
16
|
+
|
15
17
|
validates :uuid, :uuid => true
|
18
|
+
validates :resource_uuid, :uuid => {:allow_blank => true}
|
16
19
|
|
17
20
|
attr_accessor :extinct
|
18
21
|
|
@@ -129,7 +132,7 @@ module Vidibus::Resource
|
|
129
132
|
end
|
130
133
|
|
131
134
|
def resource_uri
|
132
|
-
@resource_uri ||= "/api/resources/#{self.class.to_s.tableize}/#{
|
135
|
+
@resource_uri ||= "/api/resources/#{self.class.to_s.tableize}/#{resource_uuid || uuid}"
|
133
136
|
end
|
134
137
|
end
|
135
138
|
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: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 5
|
10
|
+
version: 0.3.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|