mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Enable Style/RedundantSelf Rubocop cop
This cop checks for redundant uses of self. It supports autocorrection, so all the offenses where automatically solved. Closes #1373
This commit is contained in:
parent
444ceb8960
commit
4427f43bdf
11 changed files with 48 additions and 60 deletions
|
|
@ -66,7 +66,7 @@ class Ticket < ActiveRecord::Base
|
|||
private
|
||||
|
||||
def tickets_of_conference_have_same_currency
|
||||
unless Ticket.where(conference_id: conference_id).all?{|t| t.price_currency == self.price_currency }
|
||||
unless Ticket.where(conference_id: conference_id).all?{|t| t.price_currency == price_currency }
|
||||
errors.add(:price_currency, 'is different from the existing tickets of this conference.')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue