ask module: add rescue ackknowledgement

This commit is contained in:
iCross 2013-05-29 17:45:32 +08:00 committed by chris
parent dcc5fc39a7
commit 841fa10c55
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<% if @ask_question.errors.empty? %>
$('#acknowledgement').html('<p><%= t('ask.save_success') %>!</p><p><%= @ask_acknowledgement.content %></p>');
$('#acknowledgement').html('<p><%= t('ask.save_success') %>!</p><p><%= @ask_acknowledgement.content rescue '' %></p>');
$('html,body').scrollTop(0);
<% else %>
alert('<%= @ask_question.errors.full_messages.join('\n') %>');