lean_tag 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: 2ffdb5ec65f889d90046f2628c41fe0dd9ca59f4
4
- data.tar.gz: 31319030ef5e90fc62f6e298617c8fb2e29b4953
3
+ metadata.gz: 5c4c9dab55f5a421f093dab3d2aa54b068e2d979
4
+ data.tar.gz: d561913360f1b7225d23cf44f24f584b788947f7
5
5
  SHA512:
6
- metadata.gz: d1c26a81cd07972b6814d7b6a7c630c816743eb30af43e7df9942058deb6c05a8364170fe8cea17c3c3079a398234ab7c285b9e62287d9b4b83a3eab298c4d8c
7
- data.tar.gz: 4f461ede0df0fcba085aaa3bee431b7a5c289beae1b53b1f6e25123c10cd0bd0b569943721814e8d8e172bd467b1f615d0b740288b9466d83593abbcf4bc075f
6
+ metadata.gz: a1f765cc88d1bcf0c317dfb21ca12e150b51c34e97101ccc0a93cd3a50a0b9d228631a4d2420e4e09994c5f9c9f8c2b8a378e4614223af042698e53b4f9c0d9d
7
+ data.tar.gz: 9f987131d6426194ba05e5d4fb5c3fe681a6da5ea6b69226a0795ed25c9e74e44f4f697482c601be3bb9e1eb9a763969921a1029e698c41adf1b0c09ffc6a5a3
@@ -63,8 +63,7 @@ module LeanTag
63
63
  def remove_tag(tag)
64
64
  tag = self.tags.where(name: tag).first if tag.is_a?(String)
65
65
 
66
- tagging = self.taggings.where(tag_id: tag.id).first
67
- tagging.mark_for_destruction unless tagging.nil?
66
+ self.taggings.each { |t| t.mark_for_destruction if t.tag.eql?(tag) }
68
67
  end
69
68
 
70
69
  ##
@@ -72,8 +71,7 @@ module LeanTag
72
71
  def remove_tag!(tag)
73
72
  tag = self.tags.where(name: tag).first if tag.is_a?(String)
74
73
 
75
- tagging = self.taggings.where(tag_id: tag.id).first
76
- tagging.destroy unless tagging.nil?
74
+ self.taggings.each { |t| t.mark_for_destruction if t.tag.eql?(tag) }
77
75
  end
78
76
 
79
77
  ##
@@ -1,5 +1,5 @@
1
1
  module LeanTag
2
2
 
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lean_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Ellis