JuanVqz/doctors

View on GitHub
app/helpers/appointments_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module AppointmentsHelper
  def temperature(appointment)
    if (appointment.temperature % 1).zero?
      "#{appointment.temperature.to_i}°C"
    else
      "#{appointment.temperature}°C"
    end
  end
end