Enable Style/SpaceAroundOperators Rubocop

Cleared all the offenses for Style/SpaceAroundOperators

Added a description for the Style/SpaceAroundOperators Rubocop.
This commit is contained in:
gotens1211 2017-02-01 20:47:35 +05:30
parent 945b4aac60
commit 4a9c971ec7
11 changed files with 21 additions and 34 deletions

View file

@ -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