On my site a user has a personal profile with a link to his personal external website. The url of the sites I store in a postgresql database under the name website>
I use the postrank-uri gem to normalize the url before passing it to link_to.
class User < ActiveRecord::Base
def normalized_webpage
webpage && PostRank::URI.normalize(webpage).to_s
end
end
Then you can use link_to "website", user.normalized_webpage, target: "_blank" in your view. This will for example add the http:// to the url, if it's missing.