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