Sha256: 5d83b8653efaa6e78f8716ede1f84efe92681269093d9b69fcbea7e420b32017
Contents?: true
Size: 1.09 KB
Versions: 5
Compression:
Stored size: 1.09 KB
Contents
RailsAdmin.config do |config| ### Popular gems integration ## == Devise == # config.authenticate_with do # warden.authenticate! scope: :user # end # config.current_user_method(&:current_user) ## == Cancan == # config.authorize_with :cancan ## == Pundit == # config.authorize_with :pundit config.authorize_with do admin = begin !!User.find(session[:user_id]).try(:is_admin) rescue false end redirect_to "/" unless admin end ## == PaperTrail == # config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0 ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration ## == Gravatar integration == ## To disable Gravatar integration in Navigation Bar set to false # config.show_gravatar true 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 end
Version data entries
5 entries across 5 versions & 1 rubygems