]> cat aescling's git repositories - mastodon.git/commitdiff
Fix timeline pagination (#8827)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 29 Sep 2018 17:03:33 +0000 (19:03 +0200)
committerGitHub <noreply@github.com>
Sat, 29 Sep 2018 17:03:33 +0000 (19:03 +0200)
Ruby's ** operator does not play well with non-Hash objects, which
the params slice is

Fix #8821

app/models/concerns/paginable.rb

index 52f1869184fa074bace587c30eef497b4b386488..8863094f7d467be0ac73ae1279648d9f24b4347d 100644 (file)
@@ -20,7 +20,7 @@ module Paginable
       query
     }
 
-    scope :paginate_by_id, ->(limit, **options) {
+    scope :paginate_by_id, ->(limit, options = {}) {
       if options[:min_id].present?
         paginate_by_min_id(limit, options[:min_id]).reverse
       else