diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-18 12:38:29 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-18 12:38:29 -0800 |
commit | 4779aaa1d191b0306eaf25658b4c6a611dd9a5c2 (patch) | |
tree | b5ba2abd36eda3edc6692b944d8a78dfe2aa517b /activerecord/test | |
parent | 6d894cf3ea67192e8be3946b0d97e90fcae4cd0f (diff) | |
parent | ee738f960439e511285bc53b7207cebacda8db36 (diff) | |
download | rails-4779aaa1d191b0306eaf25658b4c6a611dd9a5c2.tar.gz rails-4779aaa1d191b0306eaf25658b4c6a611dd9a5c2.tar.bz2 rails-4779aaa1d191b0306eaf25658b4c6a611dd9a5c2.zip |
Merge pull request #13386 from rono23/fix-to-param
Fix to_param when attribute has multibyte character
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/integration_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/integration_test.rb b/activerecord/test/cases/integration_test.rb index 07ffcef875..95b028e59e 100644 --- a/activerecord/test/cases/integration_test.rb +++ b/activerecord/test/cases/integration_test.rb @@ -46,6 +46,12 @@ class IntegrationTest < ActiveRecord::TestCase assert_equal '4-ab-ab-ab-ab-ab-ab', firm.to_param end + def test_to_param_class_method_multibyte_character + firm = Firm.find(4) + firm.name = "戦場ヶ原 ひたぎ" + assert_equal '4', firm.to_param + end + def test_to_param_class_method_uses_default_if_blank firm = Firm.find(4) firm.name = nil |