views:

91

answers:

1

I'm using the auto_link method in Rails to turn urls in plain text to clickable links. It works pretty good most of the time.

but

google.com doesn't create a link

Is there something else out there that provides better coverage of urls? Or is there anyway I can easily modify the Rails code to include .coms and .net without a http or www start string?

A: 

auto_link uses AUTO_LINK_RE which you can override.

you can place a file in config/initializers

module ActionView::Helpers::TextHelper

    silence_warnings do # you might need this to get rid of the warning
        AUTO_LINK_RE = # your own definition here
    end
end

It should work, but I never tried myself.

ez