Changelog.md
We would like to think our many contributors for suggestions, ideas and improvements to FriendlyId.
treat_numeric_as_conflict option to prevent ambiguous numeric slugs. (#1037)parse_friendly_id. (#1020)allow_nil: true to the Finder (#995 and #997)first_by_friendly_id case insensitive using downcase" (#951):slug error on valid, unpersisted model (#952)unset_slug_if_invalid (#938)first_by_friendly_id case insensitive using downcase (#787)destroy_all rather than delete_all when creating historical slugs (#924)>= 2.1.0 (#923)update_attributes (#922)History::FinderMethods to use base implementation. (#853).Candidates#each method. (#773).:dependent => :destroy on FriendlyId::Slugs(#724)primary method on Edge Rails. (#557).nil on call to dup to ensure slug is generated (#483).: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 the friendly scope for friendly finds on
associations; this works on all Rails 4.0.x versions and will continue to be
supported.should_generate_new_friendly_id? is overridden.friendly scope (Norman Clarke).find no longer falls back to super unless id is fully numeric string (Norman Clarke).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).
includes over joins in globalize to avoid read-only results (Jakub Wojtysiak)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.