Fijate en la documentacion de Module ActiveRecord::Validations::ClassMethods
Si queres podes agregar un mensaje a cada validacion: validates_acceptance_of :eula, :message => "He man acepta la licencia!" o sino podes modificar ActiveRecord::Errors.default_error_messages. Pone una linea en /config/enviroment.rb como esta: ActiveRecord::Errors.default_error_messages[:taken] = "He vieja ya esta usado!" algunos symbols posibles son estos (no se si hay mas) :accepted => "must be accepted" :blank => "can't be blank" :confirmation => "doesn't match confirmation" :empty => "can't be empty" :exclusion => "is reserved" :inclusion => "is not included in the list" :invalid => "is invalid" :not_a_number => "is not a number" :taken => "has already been taken" :too_long => "is too long (maximum is %d characters)" :too_short => "is too short (minimum is %d characters)" :wrong_length => "is the wrong length (should be %d characters)" ... Saludos, Emmanuel emmanueloga.blogspot.com Pablo Rodriguez <[EMAIL PROTECTED]> escribió: Juan Fijate este link http://railscasts.com/episodes/39, ahi tenes varios screencast , el 39 habla sobre errores. Si lo que queres cambiar es el view, usa un nuevo css , en el archivo rhtml esta el código html que muestra el contenido de flash Espero que te sirva. Nos vemos en la facu Saludos Pablo Rodriguez On 6/28/07, Juan Roperto < [EMAIL PROTECTED]> wrote:Hola lista. Les tengo una quick question: ¿Cómo cambio el texto de error (flash[:notice]) que me aparece en un rhtml creado por scaffolding? Quisiera customizar los errores que me aparecen cuando valido unos campos en el form. Muchas gracias de antemano. Saludos, Juan. _______________________________________________ ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar -- Pablo Rodrigueez _______________________________________________ ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar --------------------------------- Preguntá. Respondé. Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en Yahoo! Respuestas (Beta). ¡Probalo ya!
_______________________________________________ ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
