Mail Template: Delete
This commit is contained in:
parent
2536774519
commit
335caed65e
4 changed files with 5 additions and 84 deletions
|
@ -1,5 +1,6 @@
|
|||
class DeleteAllMailValidatedInDb < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
MailTemplate.where(type: "MailValidated").delete_all
|
||||
mail_template_exist = Object.const_get(:MailTemplate).is_a?(Class) rescue false
|
||||
MailTemplate.where(type: "MailValidated").delete_all if mail_template_exist
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue