Retrospring/config/initializers/rails_admin.rb

55 lines
1.0 KiB
Ruby
Raw Normal View History

# frozen_string_literal: true
2014-12-10 08:01:59 -08:00
# workaround to get pagination right
RailsAdmin.config do |config|
2022-07-04 13:38:46 -07:00
config.asset_source = :webpacker
2014-12-10 08:01:59 -08:00
config.main_app_name = ['justask', 'Kontrollzentrum']
config.parent_controller = '::ApplicationController'
2014-12-10 08:01:59 -08:00
## == Authentication ==
config.authenticate_with do
redirect_to main_app.root_path unless current_user&.has_role?(:administrator)
2014-12-10 08:01:59 -08:00
end
config.current_user_method(&:current_user)
config.actions do
dashboard # mandatory
index # mandatory
new
export
bulk_delete
show
edit
delete
show_in_app
## With an audit adapter, you can add:
# history_index
# history_show
end
config.included_models = %w[
2022-07-05 14:17:22 -07:00
Appendable
Appendable::Reaction
2014-12-10 08:01:59 -08:00
Answer
AnonymousBlock
2014-12-10 08:01:59 -08:00
Comment
List
ListMember
2014-12-10 08:01:59 -08:00
Inbox
MuteRule
Notification
Profile
2014-12-10 08:01:59 -08:00
Question
Relationship
Relationships::Follow
Relationships::Block
2014-12-27 05:35:09 -08:00
Report
Service
Services::Twitter
2015-08-25 12:10:08 -07:00
Theme
2014-12-10 08:01:59 -08:00
User
2021-12-30 12:39:05 -08:00
UserBan
2014-12-10 08:01:59 -08:00
]
end