Report abuse

1
2
3
4
5
6
7
8
  def auto_bizman(text)
  if match = text.match(/.*?(@)((?:[_a-zA-Z0-9]+))(:|\s)/i)
    user = match[2]
    # text.gsub!(user, '<a href="http://twitter.com/' + user + '">' + user + '</a>')
    text.gsub! user, "<a href='#{app_url}#{user}'>#{user}</a>"
  end
  text
end