From e9decfa9c5d3575f2baaa085b8e04304666206f1 Mon Sep 17 00:00:00 2001 From: Stephen Becker IV Date: Wed, 2 Dec 2020 11:17:31 -0800 Subject: [PATCH] Example of to_params not generating expected data. Details in issue https://github.com/norman/friendly_id/issues/959 in older versions this would return the slug. --- test/slugged_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/slugged_test.rb b/test/slugged_test.rb index 07b6b0274..060e592b1 100644 --- a/test/slugged_test.rb +++ b/test/slugged_test.rb @@ -531,7 +531,7 @@ class Journalist < ActiveRecord::Base journalist = Journalist.new :name => 'Clark Kent', :active => true assert journalist.save journalist.name = 'Superman' - journalist.slug = nil + journalist.slug = 'no-so-superman' journalist.active = nil refute journalist.save assert_equal 'superman', journalist.to_param @@ -543,7 +543,7 @@ class Journalist < ActiveRecord::Base journalist = Journalist.new :name => 'Clark Kent', :active => true assert journalist.save journalist.name = 'x' - journalist.slug = nil + journalist.slug = 'tots-not-clark-kent' journalist.active = nil refute journalist.save assert_equal 'clark-kent', journalist.to_param