Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Truncate long links to, lets say, 64 chars

  • Loading branch information...
commit f61ea29bdd4cf6eb4b7ed95eb60559f03caed5f2 1 parent 8ed4fa5
@davidjrice davidjrice authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/views/links/_link.html.erb
2  app/views/links/_link.html.erb
@@ -1,6 +1,6 @@
<td class="short-url"><%= link_to short_url(link.key), short_url(link.key) %></td>
- <td class="long-url"><%= link_to(link.url, link.url) %></td>
+ <td class="long-url"><%= link_to(truncate(link.url, :length => 64), link.url) %></td>
<td class="num-views"><span><%= link.views %></span></td>
<td class="time-since"><%= distance_of_time_in_words link.created_at, %></td>
Please sign in to comment.
Something went wrong with that request. Please try again.