我想使用以下命令在数据库中更新记录
Profile.find_or_create(fname: contact.FirstName, lname: contact.LastName,
company: account.Name, title: contact.Title, user_id: contact.CreatedById,
account_id: account.Id, contact_id: contact.Id, type: "contact" )
哪里Profile是activerecord model
但我收到以下错误
undefined method find_or_create for Profile class
Profile.public_methods不显示find_or_create方法,但Activerecord Api定义了上述方法。
可能有什么问题?