fix: Super admin redirect issue [CW-1370] (#6715)

This commit is contained in:
Tejaswini Chile
2023-03-23 14:37:21 +05:30
committed by GitHub
parent d94f195284
commit 856d9067b0
2 changed files with 34 additions and 0 deletions

View File

@@ -1,6 +1,18 @@
class SuperAdmin::UsersController < SuperAdmin::ApplicationController
# Overwrite any of the RESTful controller actions to implement custom behavior
# For example, you may want to send an email after a foo is updated.
def create
resource = resource_class.new(resource_params)
authorize_resource(resource)
if resource.save
redirect_to super_admin_user_path(resource), notice: translate_with_resource('create.success')
else
notice = resource.errors.full_messages.first
redirect_to new_super_admin_user_path, notice: notice
end
end
#
# def update
# super