Skip to content

Commit

Permalink
Merge pull request fphilipe#72 from crashlytics/patch/body-encoding
Browse files Browse the repository at this point in the history
Use decoded instead of body.to_s
  • Loading branch information
fphilipe committed Jun 23, 2013
2 parents 0b48bf0 + 547ffa9 commit 96dadf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/premailer/rails/hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def generate_text_part
end

def premailer
@premailer ||= CustomizedPremailer.new(html_part.body.to_s)
@premailer ||= CustomizedPremailer.new(html_part.decoded)
end

def html_part
Expand All @@ -91,7 +91,7 @@ def replace_html_part(new_part)
# are used for the message. If the new part is
def replace_in_pure_html_message(new_part)
if new_part.content_type.include?('text/html')
message.body = new_part.body.to_s
message.body = new_part.decoded
message.content_type = new_part.content_type
else
message.body = nil
Expand Down

0 comments on commit 96dadf8

Please sign in to comment.