Add two foreign key columns that reference the same table

You have to name them different things:

  has_many :created_case_studies, CaseStudy, foreign_key: :created_by_id
  has_many :updated_case_studies, CaseStudy, foreign_key: :updated_by_id