mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Added feature test for mailer #2369
This commit is contained in:
parent
032cff3cf3
commit
d11aee7e95
5 changed files with 52 additions and 14 deletions
|
@ -1,10 +1,3 @@
|
|||
class MailTemplate < ActiveRecord::Base
|
||||
|
||||
validates :name, :subject, :from, :body, :text_body, presence: true
|
||||
|
||||
def to_html(body)
|
||||
template = Erubis::Eruby.new(content, escape: true)
|
||||
template_result = template.result(context)
|
||||
Sanitize.clean(RDiscount.new(template_result).to_html.encode('UTF-8', undef: :replace), Sanitize::Config::RELAXED)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue