validates_presence_of :field_name, :message => "message"; the message shows up with the :field_name message concatenated. how can i just show just the message and not the field_name? Thanks --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can''t, not using that syntax. <% If !@record.errors_on(:field_name).empty? %> OH NOES! <% end %> In your view, perhaps? On Dec 28, 2007 12:00 PM, wheels <wheels619-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > validates_presence_of :field_name, :message => "message"; the > message shows up with the :field_name message concatenated. > > how can i just show just the message and not the field_name? > > Thanks > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
wheels wrote:> validates_presence_of :field_name, :message => "message"; the > message shows up with the :field_name message concatenated. > > how can i just show just the message and not the field_name?One way is to install the custom-err-msg plugin -- http://rubyforge.org/projects/custom-err-msg/ -- and prefix your message with a caret. -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---