diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-01-26 03:38:23 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-01-26 03:38:23 +0000 |
commit | 768b60e60d19b8940138d5f412fa79f074b5c123 (patch) | |
tree | 1a9bc75f299c71014d580f16d4aa0b5a2aadb19f /actionpack/lib/action_view | |
parent | 92af8014652c7e28fa5a26682e81b974b9dbfaef (diff) | |
download | rails-768b60e60d19b8940138d5f412fa79f074b5c123.tar.gz rails-768b60e60d19b8940138d5f412fa79f074b5c123.tar.bz2 rails-768b60e60d19b8940138d5f412fa79f074b5c123.zip |
Add error_messages and error_message_on to the default FormBuilder. Closes #6939 [nik.wakelin]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 1c0829b300..dc9ef4f9ef 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -445,6 +445,14 @@ module ActionView def radio_button(method, tag_value, options = {}) @template.radio_button(@object_name, method, tag_value, options.merge(:object => @object)) end + + def error_message_on(method, prepend_text = "", append_text = "", css_class = "formError") + @template.error_message_on(@object_name, method, prepend_text, append_text, css_class) + end + + def error_messages(options = {}) + @template.error_messages_for(@object_name, options) + end end end |