We would like to think our many {file:Contributors contributors} for suggestions, ideas and improvements to FriendlyId.
- Bug fix for call to removed
primary
method on Edge Rails. (#557). - Bug fix for unwanted slug regeneration when the slug source was changed, but not the actual generated slug (#563).
- Big fix to look for UUIDs only at the end of slugs (#548).
- Various documentation and test setup improvements.
- Bug fix for calls to #dup with unslugged models (#518).
- Bug fixes for STI (#516).
- Bug fix for slug regeneration (both scoped and unscoped) (#513).
- Bug fix for finds with models that use the :history module (#509).
- Query performance improvements (#497).
- Documentation improvements (thanks John Bachir).
- Minor refactoring of internals (thanks Gagan Ahwad).
- Set slug to
nil
on call todup
to ensure slug is generated (#483).
- Fix compatibility with Rails 4.0.1.rc3 (thanks Herman verschooten).
- Fix to let scoped records reuse their slugs (thanks Donny Kurnia).
- Support friendly finds on associations in Rails 4.0.1 and up. They will
currently work on Rails 4.0 associations only if
:inverse_of
is not used. In Rails 4-0-stable, associations have been modified to use a special relation class, giving FriendlyId a consistent extension point. Since the behavior in 4.0.0 is considered defective and fixed in 4-0-stable, FriendlyId 5.0 will not support friendly finds on inverse relelations in 4.0.0. For a reliable workaround, use thefriendly
scope for friendly finds on associations; this works on all Rails 4.0.x versions and will continue to be supported. - Documentation fixes.
- When the :finders addon has been included, use it in FriendlyId's internal finds to boost performance.
- Use instance methods rather than class methods in migrations.
- On find, fall back to super when the primary key is a character type. Thanks to Jamie Davidson.
- Fix reversion to previously used slug from history table when
should_generate_new_friendly_id?
is overridden. - Fix sequencing of numeric slugs
- Removed some outdated tests.
- Improved documentation.
- Removed Guide from repository and added tasks to maintain docs up to date on Github pages at http://norman.github.io/friendly_id.
- Add an initializer to the generator; move the default reserved words there.
- Allow assignment from {FriendlyId::Configuration#base}.
- Fix bug whereby records could not reuse their own slugs.
- Update gemspec to ensure FriendlyId 5.0 is only used with AR 4.0.x.
- Add "finders" module to easily restore FriendlyId 4.0 finder behavior.
- Support for Rails 4.
- Made the :scoped and :history modules compatible with each other (Andre Duffeck).
- Removed class-level finders in favor of
friendly
scope (Norman Clarke). - Implemented "candidates" support (Norman Clarke).
- Slug "sequences" are now GUIDs rather than numbers (Norman Clarke).
find
no longer falls back to super unless id is fully numeric string (Norman Clarke).- Default sequence separator is now '-' rather than '--'.
- Support for Globalize has been removed until Globalize supports Rails 4.
- Removed upport for Ruby < 1.9.3 and Rails < 4.0.
- Update dependencies in gemspec to avoid using with Active Record 4.
- Fixed links in docs.
- Fixed table prefixes/suffixes being ignored (Jesse Farless).
- Fixed sequence generation for slugs containing numbers (Adam Carroll).
- Fixed support for Rails 3.2.9.rc1
-
Name internal anonymous class to fix marshall dump/load error (Jess Brown, Philip Arndt and Norman Clarke).
-
Avoid using deprecated
update_attribute
(Philip Arndt). -
Added set_friendly_id method to Globalize module (Norman Clarke).
-
autoload FriendlyId::Slug; previously this class was not accessible from migrations unless required explicitly, which could cause some queries to unexpectedly fail (Norman Clarke).
-
Fix Mocha load order (Mark Turner).
-
Minor doc updates (Rob Yurkowski).
-
Other miscellaneous refactorings and doc updates.
-
to_param just calls super when no friendly id is present, to keep the model's default behavior. (Andrew White)
-
FriendlyId can now properly sequence slugs that end in numbers even when a single dash is used as the separator (Tomás Arribas).
- Fix nil return value from to_param when save fails because of validation errors (Tomás Arribas)
- Fix incorrect usage of i18n API (Vinicius Ferriani)
- Improve error handling in reserved module (Adrián Mugnolo and Github user "nolamesa")
- Favor
includes
overjoins
in globalize to avoid read-only results (Jakub Wojtysiak) - Fix globalize compatibility with results from dynamic finders (Chris Salzberg)
- Fix globalize plugin to avoid issues with asset precompilation (Philip Arndt)
- Fix escape for '%' and '_' on SQLite (Norman Clarke and Sergey Petrunin)
- Allow FriendlyId to be extended or included (Norman Clarke)
- Allow Configuration#use to accept a Module (Norman Clarke)
- Fix bugs with History module + STI (Norman Clarke and Sergey Petrunin)
- Improved conflict handling and performance in History module (Erik Ogan and Thomas Shafer)
- Fixed bug that impeded using underscores as a sequence separator (Erik Ogan and Thomas Shafer)
- Minor documentation improvements (Norman Clarke)
- Added support for Globalize 3 (Enrico Pilotto and Philip Arndt)
- Allow the scoped module to use multiple scopes (Ben Caldwell)
- Fixes for conflicting slugs in history module (Erik Ogan, Thomas Shafer, Evan Arnold)
- Fix for conflicting slugs when using STI (Danny van der Heiden, Diederick Lawson)
- Maintainence improvements (Norman Clarke, Philip Arndt, Thomas Darde, Lee Hambley)
This is a complete rewrite of FriendlyId, and introduces a smaller, faster and less ambitious codebase. The primary change is the relegation of external slugs to an optional addon, and the adoption of what were formerly "cached slugs" as the primary way of handling slugging.
Please see the 3.x branch.