From dcd01d58624eae2a1eebf5cee37aed21011f6839 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 29 Jun 2013 00:28:03 +0200 Subject: [PATCH] Removed not needed force of reload. --- .../_application_controller_generic.js.coffee | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index 44a5c6625..f01d98b91 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -41,13 +41,9 @@ class App.ControllerGenericNew extends App.ControllerModal ui = @ object.save( success: -> - - # force to reload object - callbackReload = (user) -> - if ui.callback - ui.callback( user ) - ui.modalHide() - App.Collection.find( ui['genericObject'], @id, callbackReload , true ) + if ui.callback + ui.callback( @ ) + ui.modalHide() error: -> ui.log 'errors' @@ -91,13 +87,9 @@ class App.ControllerGenericEdit extends App.ControllerModal ui = @ @item.save( success: -> - - # force to reload object - callbackReload = (user) -> - if ui.callback - ui.callback( user ) - ui.modalHide() - App.Collection.find( ui['genericObject'], @id, callbackReload , true ) + if ui.callback + ui.callback( @ ) + ui.modalHide() error: => ui.log 'errors'