Sha256: c49c7547062bbd285a71afc4ba4dd62c6b4411841ba3c1dd41a82beda8465f61

Contents?: true

Size: 381 Bytes

Versions: 1

Compression:

Stored size: 381 Bytes

Contents

module Unidom::Certificate::Concerns::AsCertificated

  extend ActiveSupport::Concern

  self.included do |includer|

    has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certificated

    def is_certificated_by!(certification, opened_at: Time.now)
      certificatings.create! certification: certification, opened_at: opened_at
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unidom-certificate-1.0 app/models/unidom/certificate/concerns/as_certificated.rb