rails create if not exists code example Example: create if not exists rails Contact.where(survey_id: survey,voter_id: voter).first_or_create