ActiveModel::MissingAttributeError: can't write unknown attribute on self join model creation

class User < ApplicationRecord
  has_many :referrals, class_name: "User", foreign_key: "refer_id"
  belongs_to :refer, class_name: 'User', foreign_key: :refer_id
end

user = create!(
        name: fb_data.name,
        email: fb_data.email || '',
        facebook_id: fb_data.id,
        avatar_url: fb_data.picture_url,
        refer: User.find(1)
)

My rails model User has a self-join association. However I have this error ActiveModel::MissingAttributeError: can't write unknown attribute on self join model when trying to create it. Any idea why?