fix for nil value

This commit is contained in:
Matthew K. Fu JuYuan 2012-07-25 17:49:16 +08:00
parent 13ec25ed10
commit 87549d4e1f
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@
<div class="control-group">
<label class="control-label"><%= t 'search.site_search' %></label>
<div class="controls">
<%= 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") }%>
<p class="help-block"><%= (t 'search.site_setting_help').html_safe %></p>
</div>
</div>