has_friendship 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b63298f12c937856534b768fd95c49f1ff657e2c
4
- data.tar.gz: d1e9db82b9423243e31116c1f11069d7c5da4a87
3
+ metadata.gz: 5748ee44d7db6b70f9f1066be963b6b580aebc02
4
+ data.tar.gz: 3c61eb3e760db7546fae7cebb8672dc1f2c2357c
5
5
  SHA512:
6
- metadata.gz: 96074edc5f0ffaf553834f17b614073146119219396537f6e6a8ac8a5a4ed4033419c890d47640eafd4d3487701076f656a9057cde3bb2acc36b9103fe1628fd
7
- data.tar.gz: 264da3453b7604792f08b947d69a79d712e43b65af1efaac2572a1f0ab5f28af187110367ac6f2255ccb16d3a938522fd7e052043bb5b9195327762a3d4d427f
6
+ metadata.gz: c6e9033ebbf31b6f827790e2b645a1a96aeb46bcdf29f6e7002aebf27dd902c37a3520792158139653840a02506e81229237426645b4f9c8efd8d5e4b8a72511
7
+ data.tar.gz: c3e82476466b52cad99dd727e83ac57929e0b37ae174c301043dcc48697d985aee76fb09804197ecce77451f5ad6230c37a24f04a038bfd20f1603a7cdeac22d
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 Sung Won Cho
1
+ Copyright 2015 Sung Won Cho
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -70,7 +70,7 @@ module HasFriendship
70
70
  end
71
71
 
72
72
  def friends_with?(friend)
73
- HasFriendship::Friendship.where(friend_id: friend.id, status: 'accepted').present?
73
+ HasFriendship::Friendship.where(friendable_id: self.id, friend_id: friend.id, status: 'accepted').present?
74
74
  end
75
75
 
76
76
  end
@@ -1,3 +1,3 @@
1
1
  module HasFriendship
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_friendship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sung Won Cho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-19 00:00:00.000000000 Z
11
+ date: 2015-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails