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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd65ff58860ac2afaa7c51f64095d05122b0138add7df7cbffe64d905d64aefb
4
- data.tar.gz: 938f54cc4d112e4e205dac23db42f2621fcf560f4cb7febd8c9f61b083ff4538
3
+ metadata.gz: 35fec87554c6b3a0cd0dd1ade92dca464df390c4d3a718d09744d621f7619541
4
+ data.tar.gz: 0b6ac843524f389c07653b4ab5897953e5db6a26eba4d53f3ab16dff559fcd4d
5
5
  SHA512:
6
- metadata.gz: 3b20cdde2c6766f46c27bcee6385083ebdda9e4569101ef06f4f20dd394e6e2ee201070c4d2f59caa2d4c09f7be4565f94d4952c68ed30c7543232cc0161cfb1
7
- data.tar.gz: 243bcc4f5c75ff33cf238552fce90b38c6e5d3fa251fb5ab018dbe1d9ca6be37927b568d574668a3966407e85e26cb3aaff98dd2204d51430769ed9fd0f5597a
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
- # module Iro; end
12
- class Ish::InputError < RuntimeError; end
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
- if WpTag == tag.class
51
- self[:wp_term_ids].delete( tag.id )
52
- self.save!
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.204
4
+ version: 0.0.33.205
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox