Rails3: model: mailer: use .to_s at redmine_headers method
On Rails 3.0: <pre> DEPRECATION WARNING: Using a non-String object for a header's value is deprecated. You specified 15 (a Fixnum) for X-Redmine-Issue-Id. </pre> On Rails 3.1.3: <pre> Error: test_message_posted_message_id(MailerTest): NoMethodError: undefined method `index' for 1:Fixnum test/unit/mailer_test.rb:226:in `test_message_posted_message_id' </pre> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8468 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1b61fbf739
commit
2ab7dba964
|
@ -381,7 +381,7 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
# Appends a Redmine header field (name is prepended with 'X-Redmine-')
|
||||
def redmine_headers(h)
|
||||
h.each { |k,v| headers["X-Redmine-#{k}"] = v }
|
||||
h.each { |k,v| headers["X-Redmine-#{k}"] = v.to_s }
|
||||
end
|
||||
|
||||
# Overrides the create_mail method
|
||||
|
|
Loading…
Reference in New Issue