ask module: add rescue ackknowledgement

This commit is contained in:
iCross authored and chris committed 2013-06-07 13:04:00 +08:00
1 parent dcc5fc39a7
commit 841fa10c55
1 file changed
+1 -1
@@ -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') %>');