app/controllers/community/appointments_controller.rb
Use the return of the conditional for variable assignment and comparison. Open
Open
if current_patient.doses.exists?
@appointments_count = Appointment.waiting.not_scheduled
.where(start: from..to, ubs_id: allowed_ubs_ids)
.count
else
- Exclude checks
Align .count
with .waiting
on line 25. Open
Open
.count
- Read upRead up
- Exclude checks
This cop checks the indentation of the method name part in method calls that span more than one line.
Example: EnforcedStyle: aligned (default)
# bad
while myvariable
.b
# do something
end
# good
while myvariable
.b
# do something
end
# good
Thing.a
.b
.c
Example: EnforcedStyle: indented
# good
while myvariable
.b
# do something
end
Example: EnforcedStyle: indentedrelativeto_receiver
# good
while myvariable
.a
.b
# do something
end
# good
myvariable = Thing
.a
.b
.c
Use the return of the conditional for variable assignment and comparison. Open
Open
if current_patient.doses.exists?
rescheduled = true
else
rescheduled = false
end
- Exclude checks
Align .where
with .waiting
on line 25. Open
Open
.where(start: from..to, ubs_id: allowed_ubs_ids)
- Read upRead up
- Exclude checks
This cop checks the indentation of the method name part in method calls that span more than one line.
Example: EnforcedStyle: aligned (default)
# bad
while myvariable
.b
# do something
end
# good
while myvariable
.b
# do something
end
# good
Thing.a
.b
.c
Example: EnforcedStyle: indented
# good
while myvariable
.b
# do something
end
Example: EnforcedStyle: indentedrelativeto_receiver
# good
while myvariable
.a
.b
# do something
end
# good
myvariable = Thing
.a
.b
.c