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
This commit is contained in:
parent
1448d749f5
commit
51a1af96d4
|
@ -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}")
|
||||
|
|
Loading…
Reference in New Issue