KyivKrishnaAcademy/ved_akadem_students

View on GitHub
app/controllers/concerns/certificates_listable.rb

Summary

Maintainability
A
0 mins
Test Coverage
module CertificatesListable
  private

  def preset_certificates(student_profile)
    @certificates = if student_profile.present?
      Certificate
        .where(student_profile_id: student_profile.id)
        .order(:serial_id)
        .preload(:certificate_template)
    else
      []
    end
  end
end