Problems with validates_presence_of...anybody?

Hello everybody,
I have been developing small applications in Rails from quite some time.
But lately, I came across a bug which I have not been able to correct.
If anybody could help me with it, would be of great help thankyou.

Actually, the problem is that I have a form in my application with some
set of fields.
Now what “validates_presence_of” should do is that if I submit the form
without entering the fields should raise an error.

But instead its giving me an error :

Errno::EISDIR in Users#create

Is a directory - script/…/config/…/public/files/

And yes, I forgot to mention that I am also uploading a file in my
application. And that file is being stored in {RAILS_ROOT}/public/files/
If anybody could help me. Please.
Thankyou.

John Petterson wrote:

Hello everybody,
I have been developing small applications in Rails from quite some time.
But lately, I came across a bug which I have not been able to correct.
If anybody could help me with it, would be of great help thankyou.

Actually, the problem is that I have a form in my application with some
set of fields.
Now what “validates_presence_of” should do is that if I submit the form
without entering the fields should raise an error.

But instead its giving me an error :

Errno::EISDIR in Users#create

Is a directory - script/…/config/…/public/files/

And yes, I forgot to mention that I am also uploading a file in my
application. And that file is being stored in {RAILS_ROOT}/public/files/
If anybody could help me. Please.
Thankyou.

I guess this was left unnoticed.
If anybody could help.

sounds like your script trying to upload the file to
{RAILS_ROOT}/public/files/ because no file.

Have you seen file_column ? it simplifies and its own validations come
so handy http://www.kanthak.net/opensource/file_column/

Gokhan
www.sylow.net

Gokhan A. wrote:

sounds like your script trying to upload the file to
{RAILS_ROOT}/public/files/ because no file.

Have you seen file_column ? it simplifies and its own validations come
so handy http://www.kanthak.net/opensource/file_column/

Gokhan
www.sylow.net

Thanks for that
But I am dobtful as to whether it will work for documents?
I am trying to upload a .doc file?