From 10b9d38501aacd54077e192378ede7f263c44069 Mon Sep 17 00:00:00 2001 From: Just Me Date: Sun, 1 Oct 2023 02:28:40 +0300 Subject: [PATCH] Hide has_many associations in rails admin --- config/initializers/rails_admin.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index 8864509f..93efc583 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -78,10 +78,18 @@ config.model 'Task' do |_config| configure :file_names, :pg_string_array configure :judges, :pg_string_array + configure(:solutions) { hide } + configure(:results) { hide } + configure(:criterions) { hide } + configure(:comments) { hide } end config.model 'User' do |_config| configure :registration_ips, :pg_inet_array + configure(:solutions) { hide } + configure(:results) { hide } + configure(:comments) { hide } + configure(:criterion_user_results) { hide } end config.model 'Solution' do |_config| @@ -92,5 +100,12 @@ configure :cities, :pg_string_array configure :institutions, :pg_string_array configure :contest_sites, :pg_string_array + configure(:tasks) { hide } + configure(:users) { hide } + configure(:solutions) { hide } + end + + config.model 'Criterion' do |_config| + configure(:criterion_user_results) { hide } end end