Hi all,
I’ve been searching the web and the list archives for help on this and
I’ve
found some tips, but I’ve been racking my brain on this for hours.
I have a Model, View, and Controller that are handling the uploading of
a
file to my server. I want to make sure that the description is set and
that
a file is selected to be uploaded. I have set validates_presence_of for
both
of these fields in my model and added error_messages_for in my view.
However, the errors are not being displayed. But, if I output @
myobject.errors, I see that the errors are in fact being logged, just
not
displayed via error_messages_for. Any help that you can offer is
appreciated.
Here are links to my code:
- Model: http://dev.lazyi.net/ruby_code/user_file.rb.html
- View: http://dev.lazyi.net/ruby_code/new.rhtml.html
- Controller:
http://dev.lazyi.net/ruby_code/user_file_controller.rb.html
Many thanks,
Ryan