Skip to content

Commit

Permalink
Merge pull request #65 from pyro2927/master
Browse files Browse the repository at this point in the history
PostgreSQL issue with `readers_to_cleanup`
  • Loading branch information
ledermann committed Nov 5, 2015
2 parents 0a66af1 + d1b9a5a commit 1f179fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unread/garbage_collector.rb
Expand Up @@ -30,7 +30,7 @@ def readers_to_cleanup(reader_class)
reader_scope.
joins(:read_marks).
where(:read_marks => { :readable_type => readable_class.base_class.name }).
group('read_marks.reader_type, read_marks.reader_id').
group("read_marks.reader_type, read_marks.reader_id, #{reader_class.quoted_table_name}.#{reader_class.quoted_primary_key}").
having('COUNT(read_marks.id) > 1')
end

Expand Down

0 comments on commit 1f179fe

Please sign in to comment.