I want to update a database record using the following command
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" )
where Profile
is activerecord model
but i get the following error
undefined method find_or_create for Profile class
Profile.public_methods
does not show the find_or_create
method, but Activerecord Api
defines the above method.
What could be wrong?
source share