Added viewable? to pdf in views

This commit is contained in:
2024-08-27 16:24:33 +02:00
parent a51ceeade5
commit 18c343f9fb
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
</span>
</td>
<td class="p-2 py-3 text-center">
<% if job.pdf.attached? %>
<% if job.pdf.attached? && job.pdf.previewable? %>
<%= image_tag(url_for(job.pdf.blob.preview(resize_to_limit: [100, 100])), class: "shadow") %>
<%#= image_tag job.pdf.preview(resize_to_limit: [50, 50]), class: "mx-auto" %>
<% end %>