Creat stopped working

Hello,
   I am trying to create a new record by writing

         @person = Person.new
         @person = Person.create(params[:person])
         @person.save

I get no error but the record does not get created in the database.
also tried
@person = Person.new(params[:person])

This doesnt work either.
Same is the case for all the tables.

Strangely, all this worked before. and i pulled up a backup from my
backup archieve and tried to run that and it worked. But the current
program for some reason does not insert the record. It can search the
records.
There is no problems with the persmissions of the DB because if
permissions were to be an issue the backup wouldnt have worked.
Also, before i ran the backup i got an error "cannot convert nil to
string" but after i ran the backup and switched back to my current
project the error did not appear anymore.

Can anyone suggest me a solution for this strange behavior.
Thank you.

Ank Ag wrote:

Can anyone suggest me a solution for this strange behavior.
Thank you.

@person.errors

Ilan Berci wrote:

Ank Ag wrote:

Can anyone suggest me a solution for this strange behavior.
Thank you.

@person.errors

Hi thx a lot . I found the error source. I am using attachment_fu for
handling images and is i create a record without an image the record is
not created. This is because attachment_fu needs
content_type,size,filename fields in the database to be filled. Any idea
how can i proceed to create a record sometimes with and sometimes
without an image
Thank you.