aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-03 07:43:15 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-03 07:43:15 +0000
commit51a1af96d4d21ae5fe2cabfb6e9a4754c7da012a (patch)
tree234986cb64c9431ae616a63eb1c0fe34ddc648d3 /actionpack
parent1448d749f59bf5c964fb646d0b6fb7a0614ad4c5 (diff)
downloadrails-51a1af96d4d21ae5fe2cabfb6e9a4754c7da012a.tar.gz
rails-51a1af96d4d21ae5fe2cabfb6e9a4754c7da012a.tar.bz2
rails-51a1af96d4d21ae5fe2cabfb6e9a4754c7da012a.zip
Added note about how pre-packaged error functionality can be easier to recreate yourself than attempt to overly tailor #1489
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2112 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index c6d5e6019d..a8e78873bb 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -96,6 +96,10 @@ module ActionView
# * <tt>header_tag</tt> - Used for the header of the error div (default: h2)
# * <tt>id</tt> - The id of the error div (default: errorExplanation)
# * <tt>class</tt> - The class of the error div (default: errorExplanation)
+ #
+ # NOTE: This is a pre-packaged presentation of the errors with embedded strings and a certain HTML structure. If what
+ # you need is significantly different from the default presentation, it makes plenty of sense to access the object.errors
+ # instance yourself and set it up. View the source of this method to see how easy it is.
def error_messages_for(object_name, options = {})
options = options.symbolize_keys
object = instance_variable_get("@#{object_name}")