yoomee-acts_as_mongo_taggable 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +4 -4
- data/lib/acts_as_mongo_taggable.rb +12 -19
- metadata +7 -9
data/Rakefile
CHANGED
@@ -23,11 +23,11 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
23
23
|
end
|
24
24
|
|
25
25
|
begin
|
26
|
-
GEM = "acts_as_mongo_taggable"
|
27
|
-
AUTHOR = "Matt E. Patterson"
|
28
|
-
EMAIL = "mpatterson@ngenera.com"
|
26
|
+
GEM = "yoomee-acts_as_mongo_taggable"
|
27
|
+
AUTHOR = "Matt Atkins, Matt E. Patterson"
|
28
|
+
EMAIL = "matt@yoomee.com, mpatterson@ngenera.com"
|
29
29
|
SUMMARY = "A ruby gem for acts_as_taggable to mongo"
|
30
|
-
HOMEPAGE = "http://github.com/
|
30
|
+
HOMEPAGE = "http://github.com/Yoomee/acts_as_mongo_taggable"
|
31
31
|
|
32
32
|
gem 'jeweler', '>= 1.0.0'
|
33
33
|
require 'jeweler'
|
@@ -178,25 +178,18 @@ module ActsAsMongoTaggable
|
|
178
178
|
tags
|
179
179
|
end
|
180
180
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
# self.model_tags << model_tag
|
194
|
-
# self.tag_words << word
|
195
|
-
# end
|
196
|
-
# end
|
197
|
-
# save
|
198
|
-
# tags
|
199
|
-
# end
|
181
|
+
def untag(word_or_words, options={})
|
182
|
+
return 0 if model_tags.blank?
|
183
|
+
arr_of_words(word_or_words).each do |word|
|
184
|
+
word = word.downcase unless options[:case_sensitive] == true
|
185
|
+
tag = Tag.first(:word => word)
|
186
|
+
tagging_for_deletion = t.taggings.select{|tagging| tagging.taggable_type == self.class.name && tagging.taggable_id == self.id}.first
|
187
|
+
tag.taggings.delete tagging_for_deletion
|
188
|
+
tag.save_or_destroy
|
189
|
+
end
|
190
|
+
save
|
191
|
+
reload
|
192
|
+
end
|
200
193
|
|
201
194
|
|
202
195
|
# returns the Rating object found if user has rated this project, else returns nil
|
metadata
CHANGED
@@ -1,23 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yoomee-acts_as_mongo_taggable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
14
|
-
- Matt Atkins
|
15
|
-
- Matt E. Patterson
|
13
|
+
- Matt Atkins, Matt E. Patterson
|
16
14
|
autorequire:
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-25 00:00:00 +01:00
|
21
19
|
default_executable:
|
22
20
|
dependencies:
|
23
21
|
- !ruby/object:Gem::Dependency
|
@@ -37,7 +35,7 @@ dependencies:
|
|
37
35
|
type: :runtime
|
38
36
|
version_requirements: *id001
|
39
37
|
description: A ruby gem for acts_as_taggable to mongo
|
40
|
-
email: matt@yoomee.com
|
38
|
+
email: matt@yoomee.com, mpatterson@ngenera.com
|
41
39
|
executables: []
|
42
40
|
|
43
41
|
extensions: []
|
@@ -56,7 +54,7 @@ files:
|
|
56
54
|
- test/acts_as_mongo_taggable_test.rb
|
57
55
|
- test/test_helper.rb
|
58
56
|
has_rdoc: true
|
59
|
-
homepage: http://github.com/
|
57
|
+
homepage: http://github.com/Yoomee/acts_as_mongo_taggable
|
60
58
|
licenses: []
|
61
59
|
|
62
60
|
post_install_message:
|