diff --git a/app/admin/workers.rb b/app/admin/workers.rb index ff9e1fb..5dd1aae 100644 --- a/app/admin/workers.rb +++ b/app/admin/workers.rb @@ -21,7 +21,7 @@ column :name column :position column :description - column(:photo) { |w| image_tag(w.photo.url) } + column(:photo) { |w| image_tag(w.photo.url) if w.photo.present? } actions end @@ -30,7 +30,7 @@ row :name row :position row :description - row(:photo) { |w| image_tag(w.photo.url) } + row(:photo) { |w| image_tag(w.photo.url) if w.photo.present? } end end end