OnRails
2007-Oct-19 16:55 UTC
why I can''t update data, but I can insert data into new model
why I can''t update data, but I can insert data into new model. like this: if File.find_by_id(id) file=File.find_by_id(id) else file=File.new file.name=name file.save there is a problem, when there don''t find id, there is no problem, But when find id, update the field, there is Error, there said: undefined method ''name='' why? who can help me? Thanks!! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---