acts-as-taggable-on 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/acts_as_taggable_on/acts_as_taggable_on/core.rb +1 -1
- data/spec/acts_as_taggable_on/taggable_spec.rb +5 -0
- metadata +3 -3
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.4
|
@@ -85,7 +85,7 @@ module ActsAsTaggableOn::Taggable
|
|
85
85
|
|
86
86
|
else
|
87
87
|
tags = Tag.named_any(tag_list)
|
88
|
-
return
|
88
|
+
return scoped(:conditions => "1 = 0") unless tags.length == tag_list.length
|
89
89
|
|
90
90
|
tags.each do |tag|
|
91
91
|
safe_tag = tag.name.gsub(/[^a-zA-Z0-9]/, '')
|
@@ -177,6 +177,11 @@ describe "Taggable" do
|
|
177
177
|
TaggableModel.tagged_with("ruby, rails", :order => 'taggable_models.name').to_a.should == [bob, frank]
|
178
178
|
TaggableModel.tagged_with(["ruby", "rails"], :order => 'taggable_models.name').to_a.should == [bob, frank]
|
179
179
|
end
|
180
|
+
|
181
|
+
it "should be able to find tagged with invalid tags" do
|
182
|
+
bob = TaggableModel.create(:name => "Bob", :tag_list => "fitter, happier, more productive")
|
183
|
+
TaggableModel.tagged_with("sad, happier").should_not include(bob)
|
184
|
+
end
|
180
185
|
|
181
186
|
it "should be able to find tagged with any tag" do
|
182
187
|
bob = TaggableModel.create(:name => "Bob", :tag_list => "fitter, happier, more productive", :skill_list => "ruby, rails, css")
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 2.0.
|
8
|
+
- 4
|
9
|
+
version: 2.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michael Bleigh
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-04-05 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|