I've managed to do this successfully by adding a custom rails_admin action.
More details: https://github.com/sferik/rails_admin/wiki/Custom-action
For example:
# in lib/rails_admin/unconfirmed.rb
require 'rails_admin/config/actions'
require 'rails_admin/config/actions/base'
module RailsAdminUnconfirmed
end
module RailsAdmin
module Config
module Actions
class Unconfirmed < RailsAdmin::Config::Actions::Base
RailsAdmin::Config::Actions.register(self)
register_instance_option :controller do
Proc.new do
@objects = User.unconfirmed
render "index"
end
end
register_instance_option :collection do
true
end
end
end
end
end
The key is that it's a 'collection' action. Then you add it to the rails_admin setup:
# in config/initializers/rails_admin.rb
# require File.join(Rails.root, "lib", "rails_admin", "unconfirmed")
RailsAdmin.config do |config|
config.actions do
# root actions
dashboard
# collection actions
index
unconfirmed do
only 'User'
end
end
# snip!
end
This new action will appear at the index level of the User model.