182
183
184
185
186
187
188
189
190
191
|
# File 'lib/app/models/notification.rb', line 182
def message_from_template(template_name, locals)
template = account_message_template(template_name) ||
Template.from_file(template_name, delivery_channel: delivery_channel)
if template.present?
message_from_liquid_text(template, locals)
else
template = Template.from_file(template_name, format: 'haml', delivery_channel: delivery_channel)
template.present? ? message_from_haml_text(template, locals) : nil
end
end
|