preventing fieldWithErrors from automatically being inserted

150 views
Skip to first unread message

knb

unread,
Feb 26, 2008, 3:10:00 PM2/26/08
to Ruby on Rails: Talk
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

knb

unread,
Feb 26, 2008, 3:24:26 PM2/26/08
to Ruby on Rails: Talk
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 }

zynosure

unread,
Mar 19, 2008, 6:44:13 AM3/19/08
to Ruby on Rails: Talk
thanks
Reply all
Reply to author
Forward
0 new messages