amistad 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/amistad/active_record_friend_model.rb +3 -3
- data/lib/amistad/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaaa2fddb20b9484faeb8efb2915055bb33d63ea
|
4
|
+
data.tar.gz: e09283b1a63c21c22fba1231cfc9bcb7f57e9d73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a955343572bda74bae2314f3d03b5f7948ec205fbcedd1144f69c35be3267fe7fedb5e089fa7246b05121c5a6382f8c63eba23e97d41f49dbfc004eccfb1476b
|
7
|
+
data.tar.gz: 46d4de03c839fb7da3ee1db399d9c63f47542fa8623f7ee0d43a4b225db5f1da42d898dd1c46743c0775aea2b10d2e02293aa44b622d85870a50c554c5e50a74
|
data/Gemfile.lock
CHANGED
@@ -62,10 +62,10 @@ module Amistad
|
|
62
62
|
def friends
|
63
63
|
friendship_model = Amistad::Friendships.const_get(:"#{Amistad.friendship_model}")
|
64
64
|
|
65
|
-
|
66
|
-
|
65
|
+
approved_friendship = friendship_model.where(friendable_id: id, pending: false, blocker_id: nil).select(:friend_id).to_sql
|
66
|
+
approved_inverse_friendship = friendship_model.where(friend_id: id, pending: false, blocker_id: nil).select(:friendable_id).to_sql
|
67
67
|
|
68
|
-
self.class.where(id
|
68
|
+
self.class.where("id in (#{approved_friendship}) OR id in (#{approved_inverse_friendship})")
|
69
69
|
end
|
70
70
|
|
71
71
|
# total # of invited and invited_by without association loading
|
data/lib/amistad/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amistad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rawane ZOSSOU
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|