Friendly ID is an ActiveRecord slugging plugin that generates human-readable URL slugs from model attributes, replacing numeric IDs for cleaner permalinks in Rails applications. It resolves database records by matching a slug string instead of the numeric primary key in finder methods, enabling friendlier URLs throughout an application.
The plugin provides a slug conflict resolution system that appends a UUID or uses candidate attribute combinations to guarantee unique slugs when the primary choice is already taken. It also offers a scoped uniqueness engine that restricts slug uniqueness within a defined association or foreign key, allowing duplicate slugs across different parent records. A permalink history tracker records previous slugs for a record and redirects old URLs to the current one, preserving link integrity after slug changes. Additionally, it includes a reserved word filter that prevents specified terms from being used as slugs, avoiding conflicts with application routes or reserved paths, and provides multilingual slug support that stores and resolves different slug translations per locale.
The project covers slug generation from model attributes, candidate-based conflict resolution with prioritized fallback attribute combinations, and customizable slug generation logic through a custom generator hook. It also supports locale-specific slug translation, scoped uniqueness constraints, and history-aware redirect chains that issue HTTP redirects when outdated slugs are requested.