Method: Notification#account_message_template
- Defined in:
- lib/app/models/notification.rb
#account_message_template(template_name) ⇒ Object
Retrieve the template from the account
If the account does exists or the template in the account does exist, we catch the error and return nil
160 161 162 163 164 |
# File 'lib/app/models/notification.rb', line 160 def (template_name) account.templates.find_by(name: template_name.to_s, _type: "#{delivery_channel.humanize}Template").template rescue StandardError nil end |