ryanb/letter_opener — pull request #86 by kmcphillips (2013-12-07 16:10:33+00:00)
Title: Do not auto_link with global matcher

I have been trying to track down why all our plain text emails that have been opened in `letter_opener` seem to be missing their URLs.

It turns out that in some cases in our app the global regex matcher `$&` is `nil`. In fact all global regex values are `nil` in this specific context. I have been trying to isolate and reduce and test but with no luck. It's killing me to be honest.

Regardless, the use of globals should be discouraged. I've made a small change where the match data is passed explicitly into the block for `gsub` and used by name rather than with `$&`. Cool? I'm making the assumption there are others that might be having this specific and difficult to nail down problem.