From 099654b2da38b6634e9dd1ba3e6a1be58da0f382 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Fri, 6 Jul 2018 11:02:26 -0700 Subject: [PATCH] truncate sources on upload listing --- app/views/uploads/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/uploads/index.html.erb b/app/views/uploads/index.html.erb index f092c4754..eab7ac33e 100644 --- a/app/views/uploads/index.html.erb +++ b/app/views/uploads/index.html.erb @@ -42,7 +42,7 @@ Source - <%= link_to_if (upload.source =~ %r!\Ahttps?://!i), (upload.source.presence || content_tag(:em, "none")), upload.source %> + <%= link_to_if (upload.source =~ %r!\Ahttps?://!i), (upload.source.presence.try(:truncate, 50) || content_tag(:em, "none")), upload.source %> <%= link_to "ยป", uploads_path(search: params[:search].merge(source_matches: upload.source)) %>