How do I prevent the fieldWithErrors div from automatically being inserted into my html? I''d still like to use the error_messages_for method. Thanks kb --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
knb
2008-Feb-26 20:24 UTC
Re: preventing fieldWithErrors from automatically being inserted
found the answer after doing some googling. just insert this piece of code to override the proc that inserts the offending div. put the code in environment.rb to do a global override. or put in a controller to keep it local. ActionView::Base.field_error_proc = proc { |input, instance| input } On Feb 26, 3:10 pm, knb <kyleban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How do I prevent the fieldWithErrors div from automatically being > inserted into my html? I''d still like to use the error_messages_for > method. > > Thanks > > kb--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
zynosure
2008-Mar-19 10:44 UTC
Re: preventing fieldWithErrors from automatically being inserted
thanks On Feb 27, 1:24 am, knb <kyleban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> found the answer after doing some googling. > > just insert this piece of code to override the proc that inserts the > offending div. > > put the code in environment.rb to do a global override. or put in a > controller to keep it local. > > ActionView::Base.field_error_proc = proc { |input, instance| input } > > On Feb 26, 3:10 pm, knb <kyleban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > How do I prevent the fieldWithErrors div from automatically being > > inserted into my html? I''d still like to use the error_messages_for > > method. > > > Thanks > > > kb--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---