Permalink
Browse files

Fix project digest template to use [:smtp_settings][:domain] instead …

…of [:app_domain]

- email can be sent from a different domain than the domain of the application

I.e.: teambox.com vs app.teambox.com
  • Loading branch information...
1 parent 23864a8 commit 03250e03bba3d9e590a672ef93267306456cd44b @unixcharles unixcharles committed Nov 4, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 app/views/emailer/project_digest.html.haml
  2. +2 −2 app/views/emailer/project_digest.text.erb
View
4 app/views/emailer/project_digest.html.haml
@@ -21,11 +21,11 @@
%p
- case target
- when Task
- - email = "#{@project.permalink}+task+#{target.id}@#{Rails.configuration[:app_domain]}"
+ - email = "#{@project.permalink}+task+#{target.id}@#{Rails.configuration[:smtp_settings][:domain]}"
- stop_watch = link_to t('emailer.notify.stop_watch'), project_task_url(@project, target)
= link_to t('emailer.notify.reply_online'), project_task_url(@project, target), :style => email_button
- when Conversation
- - email = "#{@project.permalink}+conversation+#{target.id}@#{Rails.configuration[:app_domain]}"
+ - email = "#{@project.permalink}+conversation+#{target.id}@#{Rails.configuration[:smtp_settings][:domain]}"
- stop_watch = link_to t('emailer.notify.stop_watch'), project_conversation_url(@project, target)
= link_to t('emailer.notify.reply_online'), project_conversation_url(@project, target), :style => email_button
- when Activity
View
4 app/views/emailer/project_digest.text.erb
@@ -8,13 +8,13 @@
when Task -%>
<%= render 'task', :task => target %>
<%= emailer_list_comments(target.comments, @comments) -%>
-<% email = "#{@project.permalink}+task+#{target.id}@#{Rails.configuration[:app_domain]}"
+<% email = "#{@project.permalink}+task+#{target.id}@#{Rails.configuration[:smtp_settings][:domain]}"
link = project_task_url(@project, target) -%>
<% when Conversation -%>
<%= render 'conversation', :conversation => target %>
<%= emailer_list_comments(target.comments, @comments) -%>
<% link = project_conversation_url(@project, target)
- email = "#{@project.permalink}+conversation+#{target.id}@#{Rails.configuration[:app_domain]}" -%>
+ email = "#{@project.permalink}+conversation+#{target.id}@#{Rails.configuration[:smtp_settings][:domain]}" -%>
<% when Activity %>
<%= render 'activity', :activity => target %>
<% page = target.target.is_a?(Page) ? target.target : target.target.page

0 comments on commit 03250e0

Please sign in to comment.