From 73fcefca97da6d72400990d5f696803436ff34a7 Mon Sep 17 00:00:00 2001 From: manson Date: Mon, 28 Apr 2014 10:23:24 +0800 Subject: [PATCH] Fix mobile page 500 error when there's no adbanner named "Home" --- app/views/mobile/index.mobile.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/mobile/index.mobile.erb b/app/views/mobile/index.mobile.erb index 57c3043..b6f4e7c 100644 --- a/app/views/mobile/index.mobile.erb +++ b/app/views/mobile/index.mobile.erb @@ -1,8 +1,11 @@ +<% unless @ad_banner.nil? %>
<% @ad_banner.ad_images.can_display.each do |image| %> <%= image_tag image.file.url, width: @ad_banner.width, height: @ad_banner.height %> <% end %>
+<% end %> +
<% @bulletins.each do |bulletin| %>
@@ -17,6 +20,8 @@
<% end %>
+ + <% unless @ad_banner.nil? %> +<% end %>