Skip to content

Commit

Permalink
Hide has_many associations in rails admin
Browse files Browse the repository at this point in the history
  • Loading branch information
just806me committed Oct 1, 2023
1 parent 59a3526 commit 10b9d38
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions config/initializers/rails_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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

0 comments on commit 10b9d38

Please sign in to comment.