Rails Validierungen: Einzigartiger Umfang

class Project < ApplicationRecord
  belongs_to :account

  has_many :tasks

  validates :name, presence: true, uniqueness: { scope: :account_id }
end
sirchamallow