ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 237 forks source link

undefined method `html_part' for #<String:0x00007f5b16161520> #147

Closed n-rodriguez closed 6 years ago

n-rodriguez commented 6 years ago

Hi! I've updated letter_opener to version 1.5.0 and now got this error :

undefined method `html_part' for #<String:0x00007f5b16161520> Did you mean? html_safe

I've done some investigations and it breaks here : https://github.com/ryanb/letter_opener/blob/master/lib/letter_opener/message.rb#L12.

I'm using letter_opener_web too. After reverting letter_opener to version 1.4.x it's working.

Thank you!

nashby commented 6 years ago

@n-rodriguez hey! Could you please show a full stacktrace?

nashby commented 6 years ago

@n-rodriguez nvm, I found the reason: https://github.com/ryanb/letter_opener/commit/e5fbf0f231d60e539ee8ddae4144226af63a4065#diff-2e20cc2a223324b62e266a1e07ce55e7R10

I think I'll make a new release to make it compatible so letter_opener_web doesn't need to change it.

n-rodriguez commented 6 years ago

ok, do you still a need a full stacktrace? I can provide you one.

nashby commented 6 years ago

@n-rodriguez Nah, we're good. Created a PR here https://github.com/fgrehm/letter_opener_web/pull/73. This should fix this issue.