small fix

This commit is contained in:
Harry Bomrah 2017-07-05 11:53:39 +08:00
parent db464d16f3
commit c5c92d67f0
1 changed files with 2 additions and 2 deletions

View File

@ -9,10 +9,10 @@
<tbody>
<% @hpsclass.hps_lectures.each do |lecture| %>
<tr>
<% if !lecture.lecture_pic.url.empty? %>
<% if !lecture.lecture_pic.nil? && !lecture.lecture_pic.url.empty? %>
<td><img width="150px" src="<%= lecture.lecture_pic.thumb.url %>" /></td>
<% else %>
<td>&nbsp;</td>
<td><img src="http://www.placehold.it/150x150/EFEFEF/AAAAAA" width="150px"></td>
<% end %>
<td>
<%= lecture.subject %>