diff --git a/app/models/person_notifier.rb b/app/models/person_notifier.rb index 62761a4..026fa25 100644 --- a/app/models/person_notifier.rb +++ b/app/models/person_notifier.rb @@ -85,7 +85,7 @@ class PersonNotifier def content_summary(person, notifications, tasks) if person.environment ActionMailer::Base.asset_host = person.environment.top_url - ActionMailer::Base.default_url_options[:host] = person.environment.top_url.gsub(/^(https?:)?/, '') + ActionMailer::Base.default_url_options[:host] = person.environment.default_hostname end @current_theme = 'default' diff --git a/test/unit/person_notifier_test.rb b/test/unit/person_notifier_test.rb index dac964e..b6658a8 100644 --- a/test/unit/person_notifier_test.rb +++ b/test/unit/person_notifier_test.rb @@ -243,7 +243,7 @@ class PersonNotifierTest < ActiveSupport::TestCase notify sent = ActionMailer::Base.deliveries.last assert_match /src="\/\/www.gravatar.com\/avatar.*"/, sent.body.to_s - assert_match /src="http:\/\/colivre.net\/images\/icons-app\/community-icon.png.*"/, sent.body.to_s + assert_match /src="http:\/\/localhost\/images\/icons-app\/community-icon.png.*"/, sent.body.to_s end should 'list tasks in notification mail' do -- libgit2 0.21.2