simple_like 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/simple_like/user.rb +2 -2
- data/lib/simple_like/version.rb +1 -1
- metadata +1 -1
data/lib/simple_like/user.rb
CHANGED
@@ -10,11 +10,11 @@ module SimpleLike
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def like?(instance)
|
13
|
-
instance.likes.where(
|
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(
|
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
|
|
data/lib/simple_like/version.rb
CHANGED