Skip to content

Commit

Permalink
Fix blank url display on home
Browse files Browse the repository at this point in the history
  • Loading branch information
Esteban Arocha committed May 7, 2019
1 parent 315e3a7 commit db72126
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/views/home/links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

<p class="text-center">
<strong>URL:</strong>
<%= link_to nil, "http://#{@link.url}"%>
<% unless @link.url.blank?%>
<%= link_to nil, "http://#{@link.url}"%>
<% end %>
</p>

<p class="text-center">
Expand Down
11 changes: 8 additions & 3 deletions app/views/home/professors.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

<p class="text-center">
<strong>CV:</strong>
<%= link_to nil, "http://#{@professor.resume}"%>
<% unless @professor.resume.blank?%>
<%= link_to nil, "http://#{@professor.resume}"%>
<% end %>
</p>

<p class="text-center">
Expand All @@ -50,8 +52,11 @@
<% @professor.documents.each do |document| %>
<tr>
<td class="text-center"><%= document.description %></td>
<td class="text-center"><%= link_to nil, "http://#{document.url}"%> </td>

<% unless document.url.blank?%>
<td class="text-center table-hidde"><%= link_to nil, "http://#{document.url}"%></td>
<% else %>
<td class="text-center table-hidde"></td>
<% end %>
</tr>
<% end %>
</tbody>
Expand Down

0 comments on commit db72126

Please sign in to comment.