social_stream-base 0.9.32 → 0.9.33
Sign up to get free protection for your applications and to get access to all the features.
data/app/models/actor.rb
CHANGED
@@ -206,7 +206,9 @@ class Actor < ActiveRecord::Base
|
|
206
206
|
subject_types = Array(options[:type] || self.class.subtypes)
|
207
207
|
subject_classes = subject_types.map{ |s| s.to_s.classify }
|
208
208
|
|
209
|
-
as = Actor.
|
209
|
+
as = Actor.select('actors.*').
|
210
|
+
# PostgreSQL requires that all the columns must be included in the GROUP BY
|
211
|
+
group((Actor.columns.map(&:name).map{ |c| "actors.#{ c }" } + [ "contacts.created_at" ]).join(", ")).
|
210
212
|
where('actors.subject_type' => subject_classes)
|
211
213
|
|
212
214
|
if options[:load_subjects].nil? || options[:load_subjects]
|
@@ -14,7 +14,8 @@ describe HomeController do
|
|
14
14
|
|
15
15
|
describe "when authenticated" do
|
16
16
|
before do
|
17
|
-
|
17
|
+
@user = Factory(:user)
|
18
|
+
sign_in @user
|
18
19
|
end
|
19
20
|
|
20
21
|
it "should render" do
|
@@ -24,6 +25,20 @@ describe HomeController do
|
|
24
25
|
response.body.should =~ /activities_share_btn/
|
25
26
|
end
|
26
27
|
|
28
|
+
context "with a group" do
|
29
|
+
before do
|
30
|
+
Factory(:friend,
|
31
|
+
:contact => Factory(:g2g_contact, :sender => @user.actor))
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should render" do
|
35
|
+
get :index
|
36
|
+
|
37
|
+
response.should be_success
|
38
|
+
response.body.should =~ /activities_share_btn/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
27
42
|
describe "when representing" do
|
28
43
|
before do
|
29
44
|
@represented = represent(Factory(:group))
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 121
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 33
|
10
|
+
version: 0.9.33
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- GING - DIT - UPM
|