rails_cursor_pagination
rails_cursor_pagination copied to clipboard
Add cursor pagination to your ActiveRecord backed application
encountered the use case where i would like to order by two columns, but couldnt. would like to have functionality similar to active records `.order`
``` relation = Member.active.joins("LEFT JOIN memberships ON member.id = memberships.member_id") RailsCursorPagination::Paginator.new(relation, order_by: "memberships.order", order: :desc) ``` generates cursors for the records w/o the distinct `==` or `=` suffixes (e.g. "W251bGwsMjYxNzRd")...
I want to paginate a joined table and sort on a column in the join table: ``` scope = Pizza.joins(:pizza_users).order("pizza_users.preference") ``` However, if you do this: ``` RailsCursorPagination::Paginator.new( scope, order_by:...
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.56.4 to 1.59.0. Release notes Sourced from rubocop's releases. RuboCop 1.59 New features #12518: Add new Lint/ItWithoutArgumentsInBlock cop. (@koic) Bug fixes #12434: Fix a false positive for...
Bumps [activerecord](https://github.com/rails/rails) from 7.1.0 to 7.1.2. Release notes Sourced from activerecord's releases. 7.1.2 Active Support Fix :expires_in option for RedisCacheStore#write_multi. fatkodima Fix deserialization of non-string "purpose" field in Message serializer...
Bumps [rake](https://github.com/ruby/rake) from 13.0.6 to 13.1.0. Commits 5476cda Bump up v13.1.0 1b6afad Merge pull request #521 from ruby/dependabot/github_actions/ruby/setup-ruby-1... 8b2a01c Bump ruby/setup-ruby from 1.156.0 to 1.157.0 1607fbf Merge pull request #520...
Hi Team, I am trying to use custom ordering via the `order_by` property and I am running into a "column reference is ambiguous" error. The column I am trying to...
The pagination works but does the extra select COUNT(*) query for no reason. ``` chat_applications = RailsCursorPagination::Paginator.new(ChatApplication.all, first: 2, after: after).fetch ``` Why does this query do 2 extra queries?...
## Problem When we use this gem it causes two count queries before the actual query happens. But because of performance reasons we want to avoid having these count queries....
Again doing a few things at once that you likely would want to breakup just to spark the discussion: Splits Paginator into two classes: - Paginator is more of a...