Closed ccasabona closed 3 years ago
I'm pretty keen to revert this change and make it opt-in by default. I'll open a PR with the revert to start things off.
Since this is a breaking change, and defaulting to opt-in, should this new default behavior go in a 6.0.0 release (semver)?
Edit
Woops, after re-reading https://github.com/norman/friendly_id/pull/951, I see I'm mistaken. Looks like the breaking id.downcase
change in 5.4.0 will be reverted. This new ability will be available for those who need it by overriding the new parse_friendly_id
method.
My bad! This will really be "opt-in", and wouldn't be a breaking change.
This also broke our slugs on wpvulndb.com, reverting back to version 5.3.0 fixed the issue.
gem 'friendly_id', '5.3.0'
in Gemfile
Me too! updating to 5.4.0 on MilRevolts.life Thanks ethicalhack3r
Before merge of 787, one could pass a mixed-case slug to friendly.find as such:
Customer.friendly.find(params[:id
])We don't use the customer name for the slug; rather we used SecureRandom.urlsafe_base64 to generate a random string. Thus the slugs for our customers contain a mix of upper and lowercase characters. At this point we have thousands of customers with mixed-case slugs in our databases.
Because this is breaking (for us) some kind of opt-in to the new behavior would seem to make the most sense.