Juan: Si no te entendí mal, lo que preguntás es si se puede cambiar el texto del mensaje? que en lugar de: "n error(s) prohibited this model from being saved There were problems with the following fields: "
Aparezca algo "personalizado"? (Si es eso, Emmanuel me ganó de mano.... :p ) Si lo que querés es solo que aparezcan en español, mirá esto: http://l10n-simplified.rubyforge.org/ o bien otras opciones: http://wiki.rubyonrails.org/rails/pages/InternationalizationComparison Saludos! -- Gabriel Arellano. Linux Registered User #188284 Grupo de Estudios de Software Libre U.T.N. - F.R. C. del Uruguay ----BEGIN GEEK CODE BLOCK---- Version: 3.1 GCS/ED d-- s: s- a- C+++ UL++++$ P+>+++ L+++$>++++ E- W+++ w--- PS++ PE Y++ PGP++ t+++ 5- X++++ R++ tv+++ b+++ DI+++ D++++ G+ e++>++++ h+ r* y-- -----END GEEK CODE BLOCK----- On 6/29/07, Emmanuel Oga <[EMAIL PROTECTED]> wrote: > 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 > > _______________________________________________ ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
