From c9a6af8de4967b94eca5075feb898b9aa7c7f623 Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Tue, 6 Dec 2022 22:06:34 +0400 Subject: [PATCH] logic update | removed automatic redirection --- app/controllers/experiments_controller.rb | 1 - app/views/experiments/_show_header.html.erb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index f395d2c13..ea3115e33 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -89,7 +89,6 @@ class ExperimentsController < ApplicationController end def table - redirect_to module_archive_experiment_path(@experiment) if @experiment.archived_branch? view_state = @experiment.current_view_state(current_user) view_mode = params[:view_mode] || 'active' @current_sort = view_state.state.dig('my_modules', view_mode, 'sort') || 'atoz' diff --git a/app/views/experiments/_show_header.html.erb b/app/views/experiments/_show_header.html.erb index 2fc8486e8..dba699f86 100644 --- a/app/views/experiments/_show_header.html.erb +++ b/app/views/experiments/_show_header.html.erb @@ -50,7 +50,7 @@ <% end %> <% if (action_name == 'module_archive' || params[:view_mode] == 'archived') %> - <% unless @experiment.my_modules.active.count.zero? %> + <% unless @experiment.archived_branch? %>
  • <%= link_to action_name == 'table' ? table_experiment_path(@experiment) : canvas_experiment_path(@experiment) do %>