instance method auto_link_email_addresses

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v3.0.20 Private

Available in: v2.2.3 v2.3.18 v3.0.20

Signature

auto_link_email_addresses(text, html_options = {})

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.

Parameters

text req
html_options opt = {}
Source
# File actionpack/lib/action_view/helpers/text_helper.rb, line 577
        def auto_link_email_addresses(text, html_options = {})
          text.gsub(AUTO_EMAIL_RE) do
            text = $&

            if auto_linked?($`, $')
              text
            else
              display_text = (block_given?) ? yield(text) : text
              mail_to text, display_text, html_options
            end
          end
        end

Defined in actionpack/lib/action_view/helpers/text_helper.rb line 577 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Helpers::TextHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close