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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Ank Ag wrote:> > Can anyone suggest me a solution for this strange behavior. > Thank you.@person.errors -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Ilan Berci wrote:> Ank Ag wrote: > >> >> Can anyone suggest me a solution for this strange behavior. >> Thank you. > > @person.errorsHi 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---