about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-17 01:23:41 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-17 01:23:41 +0200
commitb5c6d00afae53dca1b6abd405556d58557ea7e1a (patch)
tree02e012680fbec935f39d5ea576b8bdcf6157837f /app/models/concerns
parent13ee88926d914bfa1edb6c9c8109e121f5cf9582 (diff)
Fix #99 - public timeline not just reblogs, fix #98 infinite scrolling issues
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/paginable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/paginable.rb b/app/models/concerns/paginable.rb
index 2d35d349f..0a542d534 100644
--- a/app/models/concerns/paginable.rb
+++ b/app/models/concerns/paginable.rb
@@ -4,8 +4,8 @@ module Paginable
   included do
     def self.paginate_by_max_id(limit, max_id = nil, since_id = nil)
       query = order('id desc').limit(limit)
-      query = query.where('id < ?', max_id) unless max_id.blank?
-      query = query.where('id > ?', since_id) unless since_id.blank?
+      query = query.where(arel_table[:id].lt(max_id)) unless max_id.blank?
+      query = query.where(arel_table[:id].gt(since_id)) unless since_id.blank?
       query
     end
   end