From c5c92d67f0b9ad7a6df15fbc72c05b5797f40366 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 5 Jul 2017 11:53:39 +0800 Subject: [PATCH] small fix --- app/views/admin/hps_learnings/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/hps_learnings/show.html.erb b/app/views/admin/hps_learnings/show.html.erb index 4d930e8..9366156 100644 --- a/app/views/admin/hps_learnings/show.html.erb +++ b/app/views/admin/hps_learnings/show.html.erb @@ -9,10 +9,10 @@ <% @hpsclass.hps_lectures.each do |lecture| %> - <% if !lecture.lecture_pic.url.empty? %> + <% if !lecture.lecture_pic.nil? && !lecture.lecture_pic.url.empty? %> <% else %> -   + <% end %> <%= lecture.subject %>