diff --git a/app/models/video.rb b/app/models/video.rb index 6e1dea1..21cd760 100644 --- a/app/models/video.rb +++ b/app/models/video.rb @@ -14,4 +14,8 @@ def thumbnail "https://img.youtube.com/vi/#{key}/hqdefault.jpg" end end + + def thumbnail? + thumbnail.present? + end end diff --git a/app/views/admin/shared/_media.html.erb b/app/views/admin/shared/_media.html.erb index 99b0f3c..1387dfe 100644 --- a/app/views/admin/shared/_media.html.erb +++ b/app/views/admin/shared/_media.html.erb @@ -1,7 +1,7 @@