From 841fa10c55766b156628a42cf65d8bdd42470150 Mon Sep 17 00:00:00 2001 From: iCross Date: Wed, 29 May 2013 17:45:32 +0800 Subject: [PATCH] ask module: add rescue ackknowledgement --- .../app/views/panel/ask/front_end/ask_questions/create.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb index 57fcc5ac1..57a326f20 100644 --- a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb +++ b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb @@ -1,5 +1,5 @@ <% if @ask_question.errors.empty? %> - $('#acknowledgement').html('

<%= t('ask.save_success') %>!

<%= @ask_acknowledgement.content %>

'); + $('#acknowledgement').html('

<%= t('ask.save_success') %>!

<%= @ask_acknowledgement.content rescue '' %>

'); $('html,body').scrollTop(0); <% else %> alert('<%= @ask_question.errors.full_messages.join('\n') %>');