active_metadata 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,10 +14,10 @@ module ActiveMetadata::Persistence::Watcher
|
|
14
14
|
# query always match for the current model
|
15
15
|
# matches are returned grouped by owner and contains records that define or not a particular model instance watching
|
16
16
|
def watchers_for(field)
|
17
|
-
ActiveMetadata::Watcher.where(
|
17
|
+
ActiveMetadata::Watcher.select("distinct(owner_id)").where(
|
18
18
|
"document_class = :document_class AND label = :label AND (document_id = :document_id OR document_id IS NULL)",
|
19
19
|
{ :document_class => metadata_class, :label => field, :document_id => metadata_id }
|
20
|
-
)
|
20
|
+
)
|
21
21
|
end
|
22
22
|
|
23
23
|
def delete_watcher_for(field, owner)
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_metadata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-05-
|
13
|
+
date: 2012-05-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -262,7 +262,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
segments:
|
264
264
|
- 0
|
265
|
-
hash: -
|
265
|
+
hash: -1577103634899317136
|
266
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
267
|
none: false
|
268
268
|
requirements:
|
@@ -271,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
271
|
version: '0'
|
272
272
|
segments:
|
273
273
|
- 0
|
274
|
-
hash: -
|
274
|
+
hash: -1577103634899317136
|
275
275
|
requirements: []
|
276
276
|
rubyforge_project: active_metadata
|
277
277
|
rubygems_version: 1.8.19
|