mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Enable Style/SpaceAroundOperators Rubocop
Cleared all the offenses for Style/SpaceAroundOperators Added a description for the Style/SpaceAroundOperators Rubocop.
This commit is contained in:
parent
945b4aac60
commit
4a9c971ec7
11 changed files with 21 additions and 34 deletions
|
|
@ -22,7 +22,7 @@ class Ticket < ActiveRecord::Base
|
|||
def tickets_paid(user)
|
||||
paid_tickets = quantity_bought_by(user, paid: true)
|
||||
unpaid_tickets = quantity_bought_by(user, paid: false)
|
||||
"#{paid_tickets}/#{paid_tickets+unpaid_tickets}"
|
||||
"#{paid_tickets}/#{paid_tickets + unpaid_tickets}"
|
||||
end
|
||||
|
||||
def quantity_bought_by(user, paid: false)
|
||||
|
|
@ -44,7 +44,7 @@ class Ticket < ActiveRecord::Base
|
|||
tickets.each do |ticket|
|
||||
price = ticket.total_price(user, paid: paid)
|
||||
if result
|
||||
result += price unless price.zero?
|
||||
result += price unless price.zero?
|
||||
else
|
||||
result = price
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue