mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Autocorrect new rubocop offenses
This commit is contained in:
parent
deda3d4273
commit
988b3bf689
24 changed files with 48 additions and 41 deletions
|
|
@ -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.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue