base/app/models/actor.rb in social_stream-0.12.10 vs base/app/models/actor.rb in social_stream-0.12.11

- old
+ new

@@ -204,10 +204,12 @@ # def contact_actors(options = {}) subject_types = Array(options[:type] || self.class.subtypes) subject_classes = subject_types.map{ |s| s.to_s.classify } - as = Actor.group(:id). + as = Actor.select('actors.*'). + # PostgreSQL requires that all the columns must be included in the GROUP BY + group((Actor.columns.map(&:name).map{ |c| "actors.#{ c }" } + [ "contacts.created_at" ]).join(", ")). where('actors.subject_type' => subject_classes) if options[:load_subjects].nil? || options[:load_subjects] as = as.includes(subject_types) end