Topic: Split and make links
I'm having some troubles again...
I have a column in my table where urls are saved, seperated with a , if more than one (i.e www.lala.com,www.hoho.com).
I have a couple of helper functions that are supposed to help me make links, but something's wrong..
def make_link(url = '')
if url and url != '' and not(url =~ /^http/i)
url = 'http://' + url
return '<a href="' + url + '">' + url + '</a>'
@links = urls.split(',')
@links.each do |url|