[LRUG] Ruby and URLs

Paul Campbell paul at rslw.com
Tue Apr 13 04:49:17 PDT 2010


Domainatrix is pretty sweet:

http://github.com/pauldix/domainatrix

and I believe Rails 3's implementation of auto_link is much better
than 2.x ... Tom Preston Werner linked up a back port:

http://gist.github.com/358471

—P

On Tue, Apr 13, 2010 at 12:38 PM, Kenneth Lee <kenfodder at gmail.com> wrote:
> Hi Guys,
>
> Quite a few projects I've worked on I've had to convert URLs with flat text
> to links in HTML. But every time the implementation feels inadequate with
> some ridiculous regex that isn't bundled with a spec to test against.
>
> Is there a Gem or library that will allow me to do this easily and in a
> reusable way. If so I will go into banana dance mode!
>
> Ideally I want to simply gem install something, then in simply do
> linkify(sometext) possible with a block to customize the replacement for
> html classes etc... and some config or options to say whether the http(s)
> part must exist, must have this set of subdomains, must not be a top-level,
> all these fancy options to correctly match it.
>
> I'm getting this itch to write a library like this but surely it's done?!
>
> Cheers,
>
> Ken
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>



-- 


Paul Campbell
paul at rushedsunlight.com
- - - - - - - - - - - - - - - - - - -
blog http://www.pabcas.com
twitter http://www.twitter.com/paulca
github http://www.github.com/paulca
phone +353 87 914 8162
- - - - - - - - - - - - - - - - - - -



More information about the Chat mailing list