Josh Hepworth

Obfuscated Email in Rails mail_to

In the switch to Rails 4.0 a lot of functionality that was in the core of Rails 3.2 and prior moved out to various gems. This will help the Rails core team continue to improve the fundamental features of the framework while allowing the rest of the community easier access to the tangential features.

Unfortunately, this changes has also meant that various classes and methods have simply disappeared from the Rails API. Some of these changes leave obvious clues behind, such as ActiveRecord::Observer being completely missing after upgrading to Rails 4. Others, like the removal of the encoding ability of Rails' mail_to helper, have disappeared silently.

Fortunately, just as with the other features removed from the core of Rails, you simply need to add a gem to solve your problems. In this case it's actionview-encoded_mail_to.