Skip to content
CAI
Software that uses CAICheck a score

norman/friendly_id

56.3

Adequate · 14 November 2026

2.2k

lines of production code

Ruby

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the FriendlyId gem, a Ruby library that provides slugging and pretty-URL generation for Active Record models. It features a modular addon architecture that allows developers to compose specific functionalities such as scoped uniqueness, history tracking, and sequential slugs. The library includes generators for setup, comprehensive testing, and benchmarks to ensure performance and compatibility across modern Rails versions.

Features

Added generator for FriendlyId slugs and initializer

A new Rails generator has been introduced to streamline the setup of the FriendlyId History addon. Running this generator creates a migration file to add the \friendly\_id\_slugs\ table and an initializer configuration file. Users can now opt out of generating either component by passing the \--skip-migration\ or \--skip-initializer\ flags, providing flexibility in how the gem is integrated into an existing application.

lib/generators · high confidence

Removals

Removal of friendly\_id Rake task template

The placeholder Rake task file for friendly\_id has been removed from the project. Users will no longer have access to the default 'friendly\_id' rake task template provided in this location.

tasks · high confidence

Removed legacy FriendlyId migration generator

The legacy \FriendlyIdMigrationGenerator\ and its associated \create\_slugs\ migration template have been removed. This eliminates the ability to generate the old-style slugs table structure (which included \updated\_at\ and lacked \sequence\/\scope\ fields) via the generator, aligning the codebase with the updated slug schema and modern Rails conventions.

generators · high confidence

Architecture

Refactored FriendlyId into modular addons and removed legacy slug model

The library has been restructured from a monolithic implementation into a modular architecture using distinct addons (such as Slugged, Finders, History, and Scoped) loaded via autoloading. The legacy \lib/slug.rb\ ActiveRecord model, which previously handled slug storage and normalization, has been removed in favor of a new internal \FriendlyId::Slug\ class and a centralized \Configuration\ system. This change isolates feature behaviors per model instance, preventing global monkey-patching conflicts and allowing developers to compose specific functionalities (like reserved words or sequential slugs) rather than relying on the older \has\_friendly\_id\ options.

lib · high confidence

Behavioural changes

FriendlyId 5.6.0 release with Ruby 2.7+ requirement and slug generation fixes

This release updates the gem to version 5.6.0, raising the minimum Ruby version requirement to 2.7.0. It introduces new \FriendlyId.friendly\_id?\ and \FriendlyId.unfriendly\_id?\ methods for checking slug status. Several bugs are fixed: leading-zero slugs are now treated as numeric conflicts, sequential slugs no longer repeat when separators contain regexp metacharacters, and the Babosa transliteration example has been corrected to use the \:transliterate\ option. The changelog and documentation have been updated to reflect these changes.

(repo-wide) · high confidence

FriendlyId 6.0.0 release with new addon architecture and scoped slugs

This release introduces a modular addon system where features like slugging, history, and reserved words are loaded via the \:use\ option in \friendly\_id\, replacing the previous monolithic approach. The \:scoped\ addon now allows generating unique slugs within specific scopes (e.g., per category), and the \:history\ addon automatically tracks slug changes to prevent broken links. Finders are now opt-in via the \:finders\ addon to maintain compatibility with standard Rails behavior, and the library supports sequential slugs with configurable separators and UUID fallbacks for conflicts.

_lib/friendly\id · high confidence

Test coverage

Added benchmarks for finders and object utilities; Comprehensive test suite for FriendlyId core and addons; Removed legacy test fixtures for Post and Slug models.

Dependencies

Add support for Rails 6.0 through 8.1

The gemfiles directory now includes dedicated configuration files for Rails versions 6.0, 6.1, 7.0, 7.1, 7.2, 8.0, and 8.1. This allows the library to be tested and used with these specific Rails versions, ensuring compatibility across a wide range of modern Rails releases. Each gemfile specifies the corresponding activerecord and railties versions, along with database adapters for development and testing environments.

gemfiles · high confidence

Initial gemspec and Gemfile setup for FriendlyId

The project introduces a standard Ruby gem structure with a new \Gemfile\ and \friendly\_id.gemspec\. The gemspec defines FriendlyId as a slugging and pretty-URL plugin for Active Record, requiring Ruby \>= 2.7.0 and ActiveRecord \>= 4.0.0 as a runtime dependency. Development dependencies include testing and documentation tools such as minitest (\~\> 5.3), mocha (\~\> 2.1), yard, simplecov, and ffaker, alongside railties (\>= 4.0) for integration testing.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58 → 56 (-1.2)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 61 → 57 (-3.5)
  • Architecture 98 → 98 (+0.0)
  • Maturity 51 → 51 (+0.0)
  • Readiness 51 → 51 (+0.0)
  • Security 80 → 70 (-10.0)
  • Domain Modelling 100 → 100 (+0.0)
  • Performance 85 → 85 (+0.0)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (1)

  • Off-boarding risk: anonymized user #1

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

norman/friendly_id was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 4699c9791db955dfa9929af0f38a4059af550026 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.