mirror of
https://github.com/anteo/redmine_custom_workflows.git
synced 2026-01-26 08:14:20 +00:00
Exception -> StandardError
This commit is contained in:
parent
c8eefcaa3f
commit
00c24d580b
@ -33,8 +33,8 @@ module RedmineCustomWorkflows
|
|||||||
template_params = headers.delete(:template_params) || {}
|
template_params = headers.delete(:template_params) || {}
|
||||||
if text_body || html_body
|
if text_body || html_body
|
||||||
mail headers do |format|
|
mail headers do |format|
|
||||||
format.text { render :text => text_body } if text_body
|
format.text { render text: text_body } if text_body
|
||||||
format.html { render :text => html_body } if html_body
|
format.html { render text: html_body } if html_body
|
||||||
end
|
end
|
||||||
elsif template_name
|
elsif template_name
|
||||||
template_params.each { |k,v| instance_variable_set("@#{k}", v) }
|
template_params.each { |k,v| instance_variable_set("@#{k}", v) }
|
||||||
@ -43,7 +43,7 @@ module RedmineCustomWorkflows
|
|||||||
format.html { render template_name } unless Setting.plain_text_mail?
|
format.html { render template_name } unless Setting.plain_text_mail?
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise 'Not :text_body, :html_body or :template_name specified'
|
raise StandardError.new('Not :text_body, :html_body or :template_name specified')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user