app/models/unidom/certificate/concerns/as_certification.rb in unidom-certificate-1.1 vs app/models/unidom/certificate/concerns/as_certification.rb in unidom-certificate-1.2
- old
+ new
@@ -4,8 +4,12 @@
self.included do |includer|
has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certification
+ def certificate!(certificated, by: nil, at: Time.now)
+ certificatings.create! certificated: certificated, certificator: by, opened_at: at
+ end
+
end
end