fixed default visible column logic

This commit is contained in:
Giga Chubinidze 2022-12-07 14:35:25 +04:00
parent 3c23465114
commit 96987977d1
2 changed files with 6 additions and 1 deletions

View file

@ -96,7 +96,7 @@ class ExperimentsController < ApplicationController
@project = @experiment.project
@active_modules = @experiment.my_modules.active.order(:name)
@my_module_visible_table_columns = current_user.settings['visible_my_module_table_columns'].presence || []
@my_module_visible_table_columns = current_user.my_module_visible_table_columns
end
def load_table

View file

@ -692,6 +692,11 @@ class User < ApplicationRecord
end
end
def my_module_visible_table_columns
settings['visible_my_module_table_columns'].presence ||
%w(id due_date age results status archived assigned tags comments)
end
protected
def confirmation_required?