Fix rubocop warning

This commit is contained in:
Gaetan Craig-Riou
2023-04-04 11:46:42 +10:00
committed by Maikel Linke
parent 87cc525d27
commit bb9d835bd8

View File

@@ -7,7 +7,10 @@ class Voucher < ApplicationRecord
belongs_to :enterprise
has_many :adjustments, as: :originator, class_name: 'Spree::Adjustment', inverse_of: :voucher,
has_many :adjustments,
as: :originator,
class_name: 'Spree::Adjustment',
inverse_of: :voucher,
dependent: :nullify
validates :code, presence: true, uniqueness: { scope: :enterprise_id }