Rails, I have problem. I am validating fields of a class, if validation fails i use the method error.add "Say something" , but when I test my form by giving a invalid entry, I get error output as "Say something is invalid" and not as "Say something". I really dont know where from this "is invalid" pops in. Any help? Thanks in advance Karthikeyan A K -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
tru this and reply: errors.add(:field, ''Say something'') errors.add_to_base(''Say something'') On Fri, Jan 29, 2010 at 3:09 PM, Karthikeyan <mindaslab-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rails, I have problem. > > I am validating fields of a class, if validation fails i use the > method error.add "Say something" , but when I test my form by giving a > invalid entry, I get error output as "Say something is invalid" and > not as "Say something". I really dont know where from this "is > invalid" pops in. Any help? > > Thanks in advance > > Karthikeyan A K > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Regards: Rajeev sharma +919813270707 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks Karthikeyan A K 9444018524 On Jan 29, 2:56 pm, kannav rajeev <rajeevsharm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> tru this and reply: > errors.add(:field, ''Say something'') > errors.add_to_base(''Say something'') > > > > On Fri, Jan 29, 2010 at 3:09 PM, Karthikeyan <mindas...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Rails, I have problem. > > > I am validating fields of a class, if validation fails i use the > > method error.add "Say something" , but when I test my form by giving a > > invalid entry, I get error output as "Say something is invalid" and > > not as "Say something". I really dont know where from this "is > > invalid" pops in. Any help? > > > Thanks in advance > > > Karthikeyan A K > > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > Regards: > Rajeev sharma > +919813270707-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.