I have a db that has a column src_url, that contains full urls to web resources. Currently I use
<%= link_to "source", @article.src_url %>
to display it.
What I want to do is to display first 2 or 3 domain levels instead of "Source" (so for example "www.example.com" or "example.org").
I'm fairly new to ruby on rails, so having to figure out about everything on the go, this one I was stuck on for a while.