-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed mailing issue in redmine 4.0.0 #68
base: master
Are you sure you want to change the base?
Conversation
@@ -6,10 +6,12 @@ class MentionMailer < ActionMailer::Base | |||
include ApplicationHelper | |||
|
|||
def self.default_url_options | |||
Mailer.default_url_options | |||
h = Setting.host_name | |||
h = h.to_s.gsub(%r{\/.*$}, '') unless Redmine::Utils.relative_url_root.blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this regexp do? For me it was enough to just pass Setting.host_name to :host
No this fix is so complicated. A better one could be to replace # from:
Mailer.default_url_options
# to:
::Mailer.default_url_options Then it's working ^^ The reason is Mailer is an already existing class and on this line it doesn't resolve with the right Mailer class. |
Thanks, man! its working |
No this fix is so complicated. A better one could be to replace app/models/mention_mailer.rb:9 from:Mailer.default_url_options to:::Mailer.default_url_options Then it's working ^^ The reason is Mailer is an already existing class and on this line it doesn't resolve with the right Mailer class. Yes it works for me too. |
Maybe you should add this as pull request. This fix works for us too. |
This solves #67
Disclaimer: not a ruby developer ;)