Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v3.0.9) is shown here.
auto_link_email_addresses(text, html_options = {}, options = {})
private
Turns all email addresses into clickable links. If a block is given, each
email is yielded and the result is used as the link text.
Show source
def auto_link_email_addresses(text, html_options = {}, options = {})
text.to_str.gsub(AUTO_EMAIL_RE) do
text = $&
if auto_linked?($`, $')
text.html_safe
else
display_text = block_given? ? yield(text) : text
display_text = sanitize(display_text) unless options[:sanitize] == false
mail_to text, display_text, html_options
end
end
end