Search code examples
ruby-on-railshttp-redirectmailto

Send header Location:mailto... with RoR


I try to hide my e-mail address on my public website. The idea is to to show a link to a (internal) page that then redirects to a mailto link.

With PHP the redirecting page would look like this:

<?php
  header('Location: mailto:[email protected]');
  exit;
?>

Is there a counterpart in Rails for redirecting to a mailto link?


Solution

  • Thanks @engineersmnky, just redirect_to 'mailto:[email protected]' did the trick.