From 87549d4e1f24a8a99fae5a1bad48c3f8e75daa71 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Wed, 25 Jul 2012 17:49:16 +0800 Subject: [PATCH] fix for nil value --- app/views/admin/sites/site_info.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/sites/site_info.html.erb b/app/views/admin/sites/site_info.html.erb index 021522fb..cebf9539 100644 --- a/app/views/admin/sites/site_info.html.erb +++ b/app/views/admin/sites/site_info.html.erb @@ -36,8 +36,8 @@
- <%= text_field_tag 'site[search][domains]',@site.search["domains"], {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%> - <%= text_field_tag 'site[search][sitesearch]',@site.search["sitesearch"],{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%> + <%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%> + <%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%>

<%= (t 'search.site_setting_help').html_safe %>