app/models/email_template.rb in e9_crm-0.1.16 vs app/models/email_template.rb in e9_crm-0.1.17

- old
+ new

@@ -15,6 +15,13 @@ hash[:subject] = render(:subject) hash[:html_body] = render(:html_body) hash[:text_body] = render(:text_body) end end + + protected + + def ensure_body_field_presence + self.html_body = self.html_body.presence || '' + self.text_body = self.text_body.presence || '' + end end