From ffb849047f0ea4df2e520d51765e67f201379ae7 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Wed, 4 Jan 2023 23:46:06 +0100 Subject: [PATCH] Categorise Web Push Subscriptions in Rails Admin --- config/initializers/rails_admin.rb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb index b5643f14..edc5eebb 100644 --- a/config/initializers/rails_admin.rb +++ b/config/initializers/rails_admin.rb @@ -77,7 +77,8 @@ RailsAdmin.config do |config| "Services::Twitter" => "dumpster-fire", "Theme" => "paint-brush", "User" => "user", - "UserBan" => "user-lock" + "UserBan" => "user-lock", + "WebPushSubscription" => "dot-circle" }.each do |model, icon| config.model model do navigation_icon "fa fa-fw fa-#{icon} me-1" @@ -86,17 +87,18 @@ RailsAdmin.config do |config| # set up custom parents for certain models to group them nicely together { - "AnonymousBlock" => User, - "Inbox" => User, - "List" => User, - "MuteRule" => User, - "Notification" => User, - "Profile" => User, - "Relationship" => User, - "Service" => User, - "Theme" => User, + "AnonymousBlock" => User, + "Inbox" => User, + "List" => User, + "MuteRule" => User, + "Notification" => User, + "Profile" => User, + "Relationship" => User, + "Service" => User, + "Theme" => User, + "WebPushSubscription" => User, - "ListMember" => List + "ListMember" => List }.each do |model, parent_model| config.model model do parent parent_model