acts-as-taggable-on 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/acts_as_taggable_on/acts_as_taggable_on.rb +9 -2
- metadata +4 -11
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.9
|
@@ -323,6 +323,7 @@ module ActiveRecord
|
|
323
323
|
else
|
324
324
|
opts = {:conditions => ["#{Tagging.table_name}.context = ? AND #{Tagging.table_name}.tagger_id IS NULL", context.to_s]}
|
325
325
|
end
|
326
|
+
|
326
327
|
base_tags.find(:all, opts)
|
327
328
|
end
|
328
329
|
|
@@ -408,10 +409,16 @@ module ActiveRecord
|
|
408
409
|
old_tags = tags_on(context, owner) - new_tags
|
409
410
|
old_taggings = Tagging.find(:all, :conditions => { :taggable_id => self.id, :taggable_type => self.class.base_class.to_s, :tag_id => old_tags, :tagger_id => owner.id, :tagger_type => owner.class.to_s, :context => context })
|
410
411
|
|
411
|
-
|
412
|
+
if old_taggings.present?
|
413
|
+
Tagging.destroy_all :id => old_taggings.map(&:id)
|
414
|
+
end
|
412
415
|
else
|
413
416
|
old_tags = tags_on(context) - new_tags
|
414
|
-
|
417
|
+
old_taggings = Tagging.find(:all, :conditions => { :taggable_id => self.id, :taggable_type => self.class.base_class.to_s, :tag_id => old_tags, :tagger_id => nil, :tagger_type => nil, :context => context })
|
418
|
+
|
419
|
+
if old_taggings.present?
|
420
|
+
Tagging.destroy_all :id => old_taggings.map(&:id)
|
421
|
+
end
|
415
422
|
end
|
416
423
|
|
417
424
|
new_tags.reject! { |tag| taggings.any? { |tagging|
|
metadata
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts-as-taggable-on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 1
|
7
|
-
- 1
|
8
|
-
- 8
|
9
|
-
version: 1.1.8
|
4
|
+
version: 1.1.9
|
10
5
|
platform: ruby
|
11
6
|
authors:
|
12
7
|
- Michael Bleigh
|
@@ -68,20 +63,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
63
|
requirements:
|
69
64
|
- - ">="
|
70
65
|
- !ruby/object:Gem::Version
|
71
|
-
segments:
|
72
|
-
- 0
|
73
66
|
version: "0"
|
67
|
+
version:
|
74
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
69
|
requirements:
|
76
70
|
- - ">="
|
77
71
|
- !ruby/object:Gem::Version
|
78
|
-
segments:
|
79
|
-
- 0
|
80
72
|
version: "0"
|
73
|
+
version:
|
81
74
|
requirements: []
|
82
75
|
|
83
76
|
rubyforge_project:
|
84
|
-
rubygems_version: 1.3.
|
77
|
+
rubygems_version: 1.3.5
|
85
78
|
signing_key:
|
86
79
|
specification_version: 3
|
87
80
|
summary: ActsAsTaggableOn is a tagging plugin for Rails that provides multiple tagging contexts on a single model.
|