ish_models 0.0.33.204 → 0.0.33.206
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish_models.rb +4 -2
- data/lib/office/email_conversation.rb +8 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8e24861b3b35b37b70e3af96bafba4218230202eb653062ecc5a1ab0a23eb47
|
4
|
+
data.tar.gz: 1e00c0e839c9eef2bec407c682ded95c1ec542da110959ee74c00a056d6dd862
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28eb24b925e1389526a568d21c449b67db586d2b56e906ed099006d726dc4a5b61fa870dd5c74f7dc7fb31f083a7821fbcf0c24dbb0645940bbff2aa8ab092ab
|
7
|
+
data.tar.gz: 011e9a1d8ea70590339dbe4a39ecc9769efd57b4b797ee9d542c769926a39bbaeb8493f8914ffe795c05241502bf348ca73e583c4a1dc5d01d450d3cafd802c0
|
data/lib/ish_models.rb
CHANGED
@@ -8,9 +8,11 @@ require 'kaminari/mongoid'
|
|
8
8
|
|
9
9
|
class Gameui; end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
module Iro; end
|
12
|
+
|
13
|
+
|
13
14
|
module Ish; end
|
15
|
+
class Ish::InputError < RuntimeError; end
|
14
16
|
|
15
17
|
# I need this thing for permissions???
|
16
18
|
class Manager; end
|
@@ -41,18 +41,21 @@ class Office::EmailConversation
|
|
41
41
|
else
|
42
42
|
throw "#add_tag expects a WpTag or string (eg WpTag::EMAILTAG_INBOX) as the only parameter."
|
43
43
|
end
|
44
|
-
puts! tag, 'tag'
|
45
44
|
self[:wp_term_ids] = ( [ tag.id ] + self[:wp_term_ids] ).uniq
|
46
45
|
self.save!
|
47
46
|
end
|
48
47
|
|
49
48
|
def remove_tag tag
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
case tag.class.name
|
50
|
+
when 'WpTag'
|
51
|
+
;
|
52
|
+
when 'String'
|
53
|
+
tag = WpTag.emailtag(tag)
|
53
54
|
else
|
54
|
-
throw "#remove_tag expects a WpTag as the only parameter."
|
55
|
+
throw "#remove_tag expects a WpTag or string (eg WpTag::EMAILTAG_INBOX) as the only parameter."
|
55
56
|
end
|
57
|
+
self[:wp_term_ids].delete( tag.id )
|
58
|
+
self.save!
|
56
59
|
end
|
57
60
|
|
58
61
|
def self.in_inbox
|