diff --git a/app/controllers/mcp_settings_controller.rb b/app/controllers/mcp_settings_controller.rb index a6d7597e..78ee4681 100644 --- a/app/controllers/mcp_settings_controller.rb +++ b/app/controllers/mcp_settings_controller.rb @@ -15,9 +15,9 @@ class McpSettingsController < ApplicationController @mcp_token = current_user.mcp_tokens.new(mcp_token_params) if @mcp_token.save - flash[:mcp_token] = @mcp_token.token + @mcp_tokens = [@mcp_token] - redirect_back fallback_location: settings_mcp_index_path, notice: I18n.t('mcp_token_has_been_created') + render :index, status: :created else render turbo_stream: turbo_stream.replace(:modal, template: 'mcp_settings/new'), status: :unprocessable_content end diff --git a/app/views/mcp_settings/index.html.erb b/app/views/mcp_settings/index.html.erb index b276cf0d..736f011b 100644 --- a/app/views/mcp_settings/index.html.erb +++ b/app/views/mcp_settings/index.html.erb @@ -14,7 +14,7 @@ - <% if flash[:mcp_token].present? %> + <% if @mcp_token.present? %>
<%= t('instructions') %>
-<%= t('connect_to_docuseal_mcp') %>
<%= t('add_the_following_to_your_mcp_client_configuration') %>: