simple_like 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,8 +11,11 @@ module SimpleLike
11
11
  end
12
12
 
13
13
  def simple_like
14
- IsLikeable = true
15
14
  has_many :likes, { as: :likeable, dependant: :destroy }
16
15
  end
16
+
17
+ def is_likeable
18
+ true
19
+ end
17
20
  end
18
21
  end
@@ -31,7 +31,7 @@ module SimpleLike
31
31
 
32
32
  private
33
33
  def is_likeable?(instance)
34
- instance.const_defined?(:IsLikeable)
34
+ instance.try(:is_likeable)
35
35
  end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleLike
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
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.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: