mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Paranoia doesn't support unique validation including deleted records: https://github.com/rubysherpas/paranoia/pull/333 We use a custom validator, ScopedUniquenessValidator to avoid the issue
10 lines
155 B
Ruby
10 lines
155 B
Ruby
# frozen_string_literal: false
|
|
|
|
module Vouchers
|
|
class FlatRate < Voucher
|
|
include FlatRatable
|
|
|
|
validates_with ScopedUniquenessValidator
|
|
end
|
|
end
|