Skip to content

Commit ada178d

Browse files
rishabhptrdifferentreality
authored andcommitted
Added check for image_tag occurences.
Checking for presence of a image before using image_tag Fixes openSUSE#1909
1 parent 304ab01 commit ada178d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/views/admin/sponsors/index.html.haml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
- @conference.sponsors.each do |sponsor|
2020
%tr
2121
%td
22-
= image_tag(sponsor.picture.thumb.url, width: '20%')
22+
- if sponsor.picture?
23+
= image_tag(sponsor.picture.thumb.url, width: '20%')
2324
%td
2425
= sponsor.name
2526
%td

app/views/conferences/_modal_description.haml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
- if object.is_a? Sponsor
1616
- img_classes << ['img-sponsor',
1717
"img-sponsor-#{object.sponsorship_level.position}"]
18-
= image_tag get_logo(object), class: img_classes
18+
- if object.picture?
19+
= image_tag get_logo(object), class: img_classes
1920
%p.description
2021
= object.description
2122
.modal-footer

0 commit comments

Comments
 (0)