From 772b64740673cb0e343956f2cedf8130ecac9374 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 24 Apr 2014 16:57:28 +0200 Subject: [PATCH] Fix moving table for user --- .../user/app/controllers/application_controller.js.coffee | 2 ++ app/models/list.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/user/app/controllers/application_controller.js.coffee b/app/assets/javascripts/user/app/controllers/application_controller.js.coffee index 76ca4cdb..28dbaf79 100644 --- a/app/assets/javascripts/user/app/controllers/application_controller.js.coffee +++ b/app/assets/javascripts/user/app/controllers/application_controller.js.coffee @@ -44,6 +44,8 @@ App.ApplicationController = Ember.Controller.extend join_request_approved: -> @setCurrentList -> @transitionToRoute 'active_list' + list_changed_table: -> + @setCurrentList() setCurrentList: (callback)-> success = (list)=> diff --git a/app/models/list.rb b/app/models/list.rb index 4c3c531e..3c3f802f 100644 --- a/app/models/list.rb +++ b/app/models/list.rb @@ -209,7 +209,7 @@ class List #order.section_id = self.section_id #order.save #end - broadcast_users 'list_changed_table', list: as_json, section_title: to_table.section.try(:title), from_table_id: from_table + broadcast_users 'list_changed_table', list_id: id #, from_table_id: from_table, to_table_id: to_table.id broadcast_supplier supplier_id, 'list_changed_table', list: as_json, section_title: to_table.section.try(:title), from_table_id: from_table end end