summaryrefslogtreecommitdiff
path: root/app/controllers/call_histories_controller.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-26 16:22:52 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-26 16:22:52 +0100
commite2e2fbbdc6b26e00101f5d4d1b05c0d076c817c2 (patch)
tree9bcee822e17e416dbf012f180d0abcdd309b6c51 /app/controllers/call_histories_controller.rb
parentaf4a02e15a02481e23f9458ae0a430ec52c57417 (diff)
Add a bit of AJAX to remove the just deleted row in call_history#index
Diffstat (limited to 'app/controllers/call_histories_controller.rb')
-rw-r--r--app/controllers/call_histories_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/call_histories_controller.rb b/app/controllers/call_histories_controller.rb
index 5335ed3..2bfd4e3 100644
--- a/app/controllers/call_histories_controller.rb
+++ b/app/controllers/call_histories_controller.rb
@@ -44,7 +44,10 @@ class CallHistoriesController < ApplicationController
if can?(:destroy, @call_history)
@call_history.destroy
m = method( :"#{@parent.class.name.underscore}_call_histories_url" )
- redirect_to m.(), :notice => t('call_histories.controller.successfuly_destroyed')
+ respond_to do |format|
+ format.html { redirect_to m.(), :notice => t('call_histories.controller.successfuly_destroyed')}
+ format.js
+ end
end
end