Autocorrect new rubocop offenses

This commit is contained in:
Henne Vogelsang 2025-08-12 16:44:20 +02:00
parent deda3d4273
commit 988b3bf689
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
24 changed files with 48 additions and 41 deletions

View file

@ -81,7 +81,7 @@ class Ticket < ApplicationRecord
def tickets_of_conference_have_same_currency
tickets = Ticket.where(conference_id: conference_id)
return if tickets.count.zero? || (tickets.count == 1 && self == tickets.first)
return if tickets.none? || (tickets.one? && self == tickets.first)
unless tickets.all?{|t| t.price_currency == price_currency }
errors.add(:price_currency, 'is different from the existing tickets of this conference.')