Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require Rails.root.join('lib', 'rails_admin_pending_tasks.rb')
- RailsAdmin.config do |config|
- # Custom Action to show pending tasks
- module RailsAdmin
- module Config
- module Actions
- class Pending < RailsAdmin::Config::Actions::Base
- RailsAdmin::Config::Actions.register(self)
- end
- end
- end
- end
- ### Popular gems integration
- ## == Devise ==
- config.authenticate_with do
- warden.authenticate! scope: :admin
- end
- config.current_user_method(&:current_admin)
- ## == Cancan ==
- # config.authorize_with :cancan
- ## == PaperTrail ==
- config.audit_with :paper_trail, 'User', '::PaperTrail::Version' # PaperTrail >= 3.0.0
- ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
- config.actions do
- dashboard # mandatory
- index # mandatory
- new
- export
- bulk_delete
- show
- edit
- delete
- show_in_app
- import
- ## With an audit adapter, you can add:
- history_index
- history_show
- # Add the nestable action for configured models
- nestable
- pending do
- # Make it visible only for article model. You can remove this if you don't need.
- visible do
- true
- # bindings[:abstract_model].model.to_s == "Task"
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement