03/02/2009, 21:46
|
| | Fecha de Ingreso: enero-2008 Ubicación: Mogi das Cruzes - São Paulo
Mensajes: 6
Antigüedad: 16 años, 10 meses Puntos: 0 | |
Respuesta: Sobre internacionalización Hola, tendrá que investigar el método error_messages_for :
================================================== =======
error_messages_for(*params)
Returns a string with a DIV containing all of the error messages for the objects located as instance variables by the names given. If more than one object is specified, the errors for the objects are displayed in the order that the object names are provided.
This DIV can be tailored by the following options:
* :header_tag - Used for the header of the error div (default: "h2").
* :id - The id of the error div (default: "errorExplanation").
* :class - The class of the error div (default: "errorExplanation").
* :object - The object (or array of objects) for which to display errors, if you need to escape the instance variable convention.
* :object_name - The object name to use in the header, or any text that you prefer. If :object_name is not set, the name of the first object will be used.
* :header_message - The message in the header of the error div. Pass nil or an empty string to avoid the header message altogether. (Default: "X errors prohibited this object from being saved").
* :message - The explanation message after the header message and before the error list. Pass nil or an empty string to avoid the explanation message altogether. (Default: "There were problems with the following fields:").
================================================== =======
http://api.rubyonrails.com/classes/ActionView/Helpers/ActiveRecordHelper.html
http://www.forosdelweb.com/f105/cambiar-las-clases-rubyonrails-562814/ |