changes display for empty brand_logo

This commit is contained in:
Marvin Frick
2014-06-16 10:50:17 +02:00
parent 09ffd67242
commit fcd27b761c
2 changed files with 10 additions and 8 deletions
+9 -7
View File
@@ -8,13 +8,15 @@ module AppearancesHelper
end
def brand_image
logo = if brand_item
brand_item.logo
else
'brand_logo.png'
end
image_tag logo
if brand_item
if brand_item.logo?
image_tag brand_item.logo
else
nil
end
else
image_tag 'brand_logo.png'
end
end
def brand_text
+1 -1
View File
@@ -17,7 +17,7 @@
.form-group
= f.label :logo, class: 'control-label'
.col-sm-10
- if @appearance.logo
- if @appearance.logo?
= image_tag @appearance.logo, class: 'appearance-logo-preview'
= f.file_field :logo, class: ""
.hint