John Petterson
2006-Mar-22 07:11 UTC
[Rails] 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. -- Posted via http://www.ruby-forum.com/.
John Petterson
2006-Mar-24 05:30 UTC
[Rails] Re: Problems with validates_presence_of...anybody?
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. -- Posted via http://www.ruby-forum.com/.
Gokhan Arli
2006-Mar-24 08:59 UTC
[Rails] Re: Problems with validates_presence_of...anybody?
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 -- Posted via http://www.ruby-forum.com/.
John Petterson
2006-Mar-25 06:08 UTC
[Rails] Re: Problems with validates_presence_of...anybody?
Gokhan Arli 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.netThanks for that But I am dobtful as to whether it will work for documents? I am trying to upload a .doc file? -- Posted via http://www.ruby-forum.com/.