simple_like 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,11 +10,11 @@ module SimpleLike
10
10
  end
11
11
 
12
12
  def like?(instance)
13
- instance.likes.where(author: self).present?
13
+ instance.likes.where(author_id: self, author_type: self.class.name).present?
14
14
  end
15
15
 
16
16
  def destroy_like!(instance)
17
- likes = instance.likes.where(author: self)
17
+ likes = instance.likes.where(author_id: self, author_type: self.class.name)
18
18
  likes.destroy_all if likes.present?
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  module SimpleLike
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_like
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: