The project is in a healthy, maintained state
Generates only the reader and writer per Active Record column (strict mode removes the other 19 attribute methods), compiles call sites to the calls those methods stood for and stops records allocating Hashes they never fill.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 8.0, < 8.3
>= 1.2
 Project Readme

rails-minify

Fewer generated Active Record methods, production profiling and configuration checks, and checks for callback problems, for Rails apps. One repository, one folder per gem:

gem what it does
rails-minify Strict mode through activerecord-minimizer; minify:check for callback problems, minify:doctor for production configuration, SQL profiling from production traffic. Experimental patches for parts of Rails and common gems that redo work on every request. Start here.
activerecord-minimizer Only readers and writers per column (strict mode removes the other 19 attribute methods). Experimental: call sites compiled to what the removed methods stood for, smaller records.
activesupport-minimizer Callback checks: missing targets, long chains, callbacks that save their own record. Experimental: callback chains as one generated method per chain.
actionpack-minimizer Optional and experimental: route helpers as string interpolation; render and link_to in templates without their option-hash machinery.
rubocop-minify RuboCop cop and ERB fixer that rewrite calls to the methods strict mode removes.

Most of what's here was built as per-call speedups. In production they made no measurable difference, so they're experimental now and off by default; rails-minify's README has the numbers.

# Gemfile
gem "rails-minify"
gem "rubocop-minify", require: false, group: :development

# config/application.rb (every environment, so CI catches calls to removed methods)
config.ar_minimizer.slim = true

Ruby 3.4+, Rails 8.0, 8.1 and main. MIT licensed.

Development

Each folder is its own gem with its own Gemfile and tests:

cd activerecord-minimizer && bundle install && bundle exec rake test