New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

paginate_alphabetically

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paginate_alphabetically

  • 0.2.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

h2. PaginateAlphabetically

An easy way to paginate a list of ActiveRecord objects alphabetically by any given attribute.

h2. Example

h3. Model

bc. class User < ActiveRecord::Base paginate_alphabetically :by => :surname end

h3. Controller

bc. class UsersController < ApplicationController def index @users = User.alphabetical_group(params[:letter]) end end

h3. View (haml example)

bc. = alphabetically_paginate(@users) %ul.users

  • @users.each do |user| %li= user.surname

h2. Testing

The tests use a sqlite3 in-memory database to be able to run separately from your application.

bc. rake test

Copyright (c) 2010 Eden Development, released under the MIT license

FAQs

Package last updated on 10 Sep 2010

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc