Sha256: 754471c329fd998e1516aee93e218d8e8f4beb2b8c78aaaa87e67f6584e66b21
Contents?: true
Size: 448 Bytes
Versions: 10
Compression:
Stored size: 448 Bytes
Contents
module Helpers::Base include Pagy::Frontend include Pagy::Backend def has_order?(scope) # This scope has an order if the SQL changes when we remove any order clause. scope.to_sql != scope.reorder("").to_sql end # TODO This should really be in the API package and included from there. if defined?(BulletTrain::Api) def render_pagination(json) if @pagy json.has_more @pagy.has_more end end end end
Version data entries
10 entries across 10 versions & 1 rubygems