diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-06-17 19:37:08 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-06-17 19:37:56 -0700 |
commit | 5267addd4f986c89df3d31f35e046abc3b1fbe26 (patch) | |
tree | fa0e1df3be7046134c5cf9053096b08620bc5ddc /actionpack/test/template/form_helper_test.rb | |
parent | fbdf706fffbfb17731a1f459203d242414ef5086 (diff) | |
download | rails-5267addd4f986c89df3d31f35e046abc3b1fbe26.tar.gz rails-5267addd4f986c89df3d31f35e046abc3b1fbe26.tar.bz2 rails-5267addd4f986c89df3d31f35e046abc3b1fbe26.zip |
Use errors[field] instead of errors.on(field)
Diffstat (limited to 'actionpack/test/template/form_helper_test.rb')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 947668ccc6..f8215132e3 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -50,7 +50,7 @@ class FormHelperTest < ActionView::TestCase @comment = Comment.new def @post.errors() Class.new{ - def on(field); "can't be empty" if field == "author_name"; end + def [](field); field == "author_name" ? ["can't be empty"] : [] end def empty?() false end def count() 1 end def full_messages() [ "Author name can't be empty" ] end @@ -1193,4 +1193,4 @@ class FormHelperTest < ActionView::TestCase def protect_against_forgery? false end -end
\ No newline at end of file +end |