Sha256: b6708005836d1cf2360a66ccba59fd82010a4aac792e3ea3b3c4cbce3c507e0d
Contents?: true
Size: 929 Bytes
Versions: 31
Compression:
Stored size: 929 Bytes
Contents
class CertificateProgram < ApplicationRecord belongs_to :organization has_many :certificates active_between :start_date, :end_date, aliased_as: :ongoing 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.started_at %> <%#= certificate.ended_at %> <%#= 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
31 entries across 31 versions & 1 rubygems