Sha256: 77ebb3ad52d8db6e891becdf27c9f6fbd42e31c6787491caa2339d5a2c11604d

Contents?: true

Size: 866 Bytes

Versions: 5

Compression:

Stored size: 866 Bytes

Contents

class CertificateProgram < ApplicationRecord
  belongs_to :organization
  has_many :certificates

  def friendly
    title
  end

  def template_html_erb
    self[:template_html_erb] ||= <<HTML
<style>
  .qr-code {
    bottom: 5px;
    right: 5px;
    height: 15mm;
    width: 15mm;
  }
  .name {
    position: absolute;
    width: 100%;
    top: 380px;
    text-align: center;
  }
</style>
<!-- You can use interpolations like --
  <%#= certificate.start_date %>
  <%#= certificate.end_date %>
  <%#= user.formal_first_name %>
  <%#= user.formal_last_name %>
  <%#= user.formal_full_name %>
  <%#= certificate_program.title %>
  <%#= certificate_program.description %>
  <%#= organization.name %>
  <%#= organization.display_name %>
--                                  -->
<section class="name">
    <h1><%= user.formal_full_name %></h1>
</section>
HTML
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mumuki-domain-9.0.5 app/models/certificate_program.rb
mumuki-domain-9.0.4 app/models/certificate_program.rb
mumuki-domain-9.0.3 app/models/certificate_program.rb
mumuki-domain-9.0.2 app/models/certificate_program.rb
mumuki-domain-9.0.0 app/models/certificate_program.rb