diff --git a/app/models/person_notifier.rb b/app/models/person_notifier.rb index 62761a4..fa2a1f9 100644 --- a/app/models/person_notifier.rb +++ b/app/models/person_notifier.rb @@ -84,8 +84,8 @@ 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.asset_host = person.environment.default_hostname + 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..76a9e7f 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="\/\/localhost\/images\/icons-app\/community-icon.png.*"/, sent.body.to_s end should 'list tasks in notification mail' do -- libgit2 0.21.2