From 49ae9bcd55ccf8f419c7be0ba04ed79c1fc693c5 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 20 Dec 2017 13:39:35 +0100 Subject: [PATCH] Fix adding users to a task [SCI-1870] --- app/controllers/user_my_modules_controller.rb | 10 ++++++---- .../my_modules/modals/_manage_users_modal.html.erb | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/controllers/user_my_modules_controller.rb b/app/controllers/user_my_modules_controller.rb index e4555b71d..04797669d 100644 --- a/app/controllers/user_my_modules_controller.rb +++ b/app/controllers/user_my_modules_controller.rb @@ -44,7 +44,7 @@ class UserMyModulesController < ApplicationController if @um.save # Create activity message = t( - "activities.assign_user_to_module", + 'activities.assign_user_to_module', assigned_user: @um.user.full_name, module: @my_module.name, assigned_by_user: current_user.full_name @@ -58,9 +58,11 @@ class UserMyModulesController < ApplicationController type_of: :assign_user_to_module ) respond_to do |format| - format.json { - redirect_to :action => :index_edit, :format => :json - } + format.json do + redirect_to my_module_users_edit_path(format: :json), + turbolinks: false, + status: 303 + end end else respond_to do |format| diff --git a/app/views/my_modules/modals/_manage_users_modal.html.erb b/app/views/my_modules/modals/_manage_users_modal.html.erb index 967c815a9..8ed04d910 100644 --- a/app/views/my_modules/modals/_manage_users_modal.html.erb +++ b/app/views/my_modules/modals/_manage_users_modal.html.erb @@ -9,7 +9,9 @@