aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-14 15:40:34 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-14 15:42:24 -0700
commit787e22bb491bd8c36db1e9734261c4ce02c5c5fd (patch)
treedfe8700206807038d9a8d89f520410f0bc9e2da9 /actionview/test
parentdf73d696f5a965b67c9f177bf4dd8d85921d0214 (diff)
downloadrails-787e22bb491bd8c36db1e9734261c4ce02c5c5fd.tar.gz
rails-787e22bb491bd8c36db1e9734261c4ce02c5c5fd.tar.bz2
rails-787e22bb491bd8c36db1e9734261c4ce02c5c5fd.zip
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.
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/template/form_helper_test.rb2
1 files changed, 1 insertions, 1 deletions
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