Skip to content

Commit

Permalink
Merge pull request #58 from carineLC/fix-case-worker-has-no-photo
Browse files Browse the repository at this point in the history
Fixed index and show of workers in admin if no photo
  • Loading branch information
carineLC committed Feb 20, 2020
2 parents 65993c3 + 6001cf6 commit 1ff67a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/admin/workers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 1ff67a5

Please sign in to comment.