ish_models 0.0.33.204 → 0.0.33.205
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: 35fec87554c6b3a0cd0dd1ade92dca464df390c4d3a718d09744d621f7619541
|
4
|
+
data.tar.gz: 0b6ac843524f389c07653b4ab5897953e5db6a26eba4d53f3ab16dff559fcd4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d7ae686679c20bdf871ead96a7e1268f1adac15f90427fdc414641e433dfe8102663354db4d9149610a3d8fff3d3f5b8eb656961e3a6b49f6a4750ef2fdc06
|
7
|
+
data.tar.gz: f5df4f1ee219aafbe30ed50e3a845c8be3063250e6749756bc7686da66d76c5df41009af9036c17d4dc822c817fb0f8fc93e46e1bb2ec6fc5bcf91cfa0e94b1d
|
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
|