module Unidom::Certificate::Concerns::AsCertification extend ActiveSupport::Concern self.included do |includer| has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certification def certificate!(certificated, opened_at: Time.now) certificatings.create! certificated: certificated, opened_at: opened_at end end end