Chen Log


AutoLink on ruby on rails

leave a comment »

Because the AutoLink on rails has removed in rails 3.1,

so if you have to use the function you must be install other gem: 「Rinku


Before you start to install the Rinku Gem,

you must install the Xcode app and agree the license.


$ gem install rinku


  • Inserted require 'rinku' into the controller file
  • Inserted the following into the view file <% text = "Go to or email me at" %> and <%= Rinku.auto_link(text, mode=:all, link_attr=nil, skip_tags=nil) %>

key those text on the view file:

auto_link('', :all, 'target="_blank"')

Reference this url:


Written by chenagw

2014/04/21 at 00:40

Posted in Uncategorized

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: