hide ugoira preview/video link if it hasn't finished processing

This commit is contained in:
r888888888
2014-10-28 11:30:02 -07:00
parent 94fd03f5d0
commit 3aa0ee2a75
4 changed files with 17 additions and 2 deletions

View File

@@ -152,6 +152,10 @@ class Post < ActiveRecord::Base
def has_dimensions?
image_width.present? && image_height.present?
end
def has_ugoira_webm?
created_at < 1.minute.ago || File.exists?(preview_file_path)
end
end
module ImageMethods