Skip to content

Commit

Permalink
Refactored invoice.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
tsoganov committed Jun 28, 2024
1 parent f546a8a commit dd87831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def payment_reference_present_in_params?
end

def payment_reference_must_change
if payment_reference.present? && payment_reference == payment_reference_was
errors.add(:payment_reference, 'must be different from the existing payment reference')
end
return unless payment_reference.present? && payment_reference == payment_reference_was

errors.add(:payment_reference, 'must be different from the existing payment reference')
end
end

0 comments on commit dd87831

Please sign in to comment.