On 18 August 2010 13:02, Bla ... <[email protected]> wrote: > I'm having a problem, 'cause I wrote the following line in my model > "Hi": > > [code] > validates_numericality_of :phone, :only_integer => true, :allow_blank => > false, :message => "must be a number" > [/code] > > And in my "new" view, I put: > > [code] > <%= error_messages_for :oi,
I think that should be hi not oi, and I think you have to put the model name in quotes also, so error_messages_for 'hi', ..... Colin > :header_message => "Erro ao cadastrar usuário." , > :message => "Cheque o(s) seguinte(s) campo(s):"%> > [/code] > > Rails notice the error, because I can't save a Hi object with phone not > being a number; but it doesn't show me the errors that was find. > > What it should be? > > Thanks for any help. > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

