npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@activeadmin-plugins/activeadmin_calendar

v1.0.1

Published

Calendar index style for ActiveAdmin — CSS for the gem of the same name.

Readme

activeadmin_calendar

CI Coverage Ruby

Adds index as: :calendar to ActiveAdmin — renders the resource list as a month grid with one cell per day. The index block is yielded (date, records_for_that_day).

Works with ActiveAdmin 3.5+ and 4.x.

ActiveAdmin 4

Payments calendar on AA 4

ActiveAdmin 3

Payments calendar on AA 3.5

Install

# Gemfile
gem "activeadmin_calendar"

For Sprockets (AA 3):

/* app/assets/stylesheets/active_admin.scss */
@import "activeadmin_calendar";

Propshaft / Tailwind (AA 4) picks the bundled CSS up automatically.

Usage

Single-date events — group_by:

One SQL query per visible month, rows bucketed in Ruby.

ActiveAdmin.register Payment do
  config.paginate = false
  filter :card_type, as: :select, collection: Payment::CARD_TYPES

  index as: :calendar, group_by: :paid_at do |date, payments|
    by_card = payments.group_by(&:card_type)
                      .transform_values { |ps| ps.sum(&:amount) }
    ul do
      by_card.each { |c, sum| li "#{c.upcase}: #{number_to_currency(sum)}" }
      total = by_card.values.sum
      li { strong "Total: #{number_to_currency(total)}" } unless total.zero?
    end
  end
end

Range / fan-out events — group_by_scope:

One row appears in every day in its active range. Use a custom scope:

ActiveAdmin 4

Bookings calendar — fan-out on AA 4

ActiveAdmin 3

Bookings calendar — fan-out on AA 3.5

class Booking < ApplicationRecord
  scope :active_on, ->(date) { where("check_in <= ? AND check_out > ?", date, date) }
end

ActiveAdmin.register Booking do
  filter :room_number
  filter :guest_name_cont, label: "Guest name contains"

  index as: :calendar, group_by_scope: :active_on do |date, bookings|
    ul do
      bookings.sort_by(&:room_number).each do |b|
        first, last = b.check_in == date, b.check_out - 1.day == date
        marker = first && last ? "•" : first ? "→" : last ? "←" : "·"
        li { text_node "#{marker} ##{b.room_number} #{b.guest_name}" }
      end
    end
  end
end

May 18 → 21 booking shows on 18 (), 19 (·), 20 ().

Options

| Option | Effect | |---|---| | group_by: (Symbol) | Bucket by a date/datetime column. 1 SQL per month (prefetched). | | group_by_scope: (Symbol) | Call Model.scope(date) per cell — for ranges, joins, or any bucket logic that simple where(col = date) can't express. N SQL per month (one per visible day). |

URL params ?year=2026&month=5 drive the visible month. Today / Previous / Next links are rendered automatically and preserve current filter params.

Ransack filters apply transparently — the gem buckets the already-scoped collection. ?q[card_type_eq]=visa narrows what's shown in each cell.

Compatibility

| AA | Status | |---|---| | 4.0.0.beta22 | ✅ | | 3.5 | ✅ |

License

MIT