Merge branch 'develop' into auto_archive_on_date
This commit is contained in:
commit
c2a27c6f6a
36 changed files with 248 additions and 149 deletions
|
@ -39,7 +39,7 @@ class Procedure < ActiveRecord::Base
|
|||
MAIL_TEMPLATE_TYPES = %w(InitiatedMail ReceivedMail ClosedMail RefusedMail WithoutContinuationMail)
|
||||
|
||||
MAIL_TEMPLATE_TYPES.each do |name|
|
||||
has_one "#{name.underscore}".to_sym, class_name: "Mails::#{name}"
|
||||
has_one "#{name.underscore}".to_sym, class_name: "Mails::#{name}", dependent: :destroy
|
||||
define_method("#{name.underscore}_with_override") do
|
||||
self.send("#{name.underscore}_without_override") || Object.const_get("Mails::#{name}").default
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue