Alastair Moore
2006-Aug-31 19:22 UTC
Peculiar validation error: undefined local variable or method ''fieldWithErrors''
Hello all,
I''m submitting a form with the following field -
<%= p.text_field :postcode, {:class => ''inputMedium''}
%>
and on submitting the form I am getting this error -
NameError in Property#create
Showing app/views/property/sell.rhtml where line #52 raised:
undefined local variable or method `fieldWithErrors'' for #<Object:
0x1de968>
Extracted source (around line #52):
49:
50: <p>
51: <label
for="property_profile_postcode">Postcode</label>
52: <%= p.text_field :postcode, {:class =>
''inputMedium''} %>
53: </p>
54: </fieldset>
55:
However, if I remove the {:class => ''inputMedium''} option,
the form
processes fine. This occurs when I have validates_presence_of :postcode
Any ideas??
Many thanks in advance,
Alastair
------
Alastair Moore
Standards compliant web development with Ruby On Rails, PHP and ASP
www.kozmo.co.uk
07738 399038
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Alastair Moore
2006-Sep-03 14:18 UTC
Re: Peculiar validation error: undefined local variable or method ''fieldWithErrors''
I''ve still not managed to fix this error and it''s occurring
elsewhere
in my project. Does anyone have any suggestions on what the problem
might be? It seems like removing {:class => ''...''} options
fixes this
error, which is not an ideal situation!
Many thanks,
Alastair
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---