From 787e22bb491bd8c36db1e9734261c4ce02c5c5fd Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Wed, 14 Jan 2015 15:40:34 -0700 Subject: Don't use the `_before_type_cast` version of attributes in the form We should never be ignoring valuable information that the types may need to give us. The reason that it originally used `_before_type_cast` is unclear, but appears to date back long enough that the reasons may not be relevant today. There is only one test that asserts that it uses the before type cast version, but it gives no context as to why and uses a mock which does not simulate the real world. Fixes #18523. --- actionview/test/template/form_helper_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/test/template') diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index fff1e1e572..f766cff675 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -99,7 +99,7 @@ class FormHelperTest < ActionView::TestCase }.new end def @post.to_key; [123]; end - def @post.id_before_type_cast; 123; end + def @post.id; 123; end def @post.to_param; '123'; end @post.persisted = true -- cgit v1.2.3