
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
active_resource_pagination
Advanced tools
= active_resource_pagination
This gem adds pagination support to Active Resource.
== Sample Usage
Article.paginate Article.paginate(:page => 2, :per_page => 20) Article.paginate(:page => 2, :per_page => 20, :total_entries => 123) Article.paginate(:page => 2, :per_page => 20, :params => {:year => 2010})
== Configuration
To set default per_page value for all resources. you can do ActiveResource::Base.per_page = 20 # in config/environment or initializers
or to implement per_page() in your resource class.
== Detail
When doing the pagination query, it converts :page and :per_page parameters to :offset and :limit to the actual find method, assure your backend honors :offset and :limit parameters.
Article.paginate(:page => 2, :per_page => 20, :params => {:year => 2010}) # is translated into 2 request calls
Article.find(:all, :params => {:year => 2010, :offset => 40, :limit => 20}) Article.find(:one, :from => :count, :params => {:year => 2010})
FAQs
Unknown package
We found that active_resource_pagination demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.