First or Initialize

If not sure if already have a record. The first_or_initialize method1 is good to avoid duplication. A close relative is the find_or_create_by method2

twitter_account = Current
  .user.twitter_accounts
  .where(username: auth.info.nickname)
  .first_or_initialize