Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:10:26+00:00 2026-06-03T11:10:26+00:00

In my ActiveAdmin model I have a custom scope to show deleted records and

  • 0

In my ActiveAdmin model I have a custom scope to show deleted records and several filters for searching records by specific columns.

Using the filters individually or combined together works as expected.

Using a scope works as expected.

The problem is that using a scope seemingly overrides all the filters and after selecting a scope any filter added does nothing.

Anyone have any ideas here? What I want is to be able to show a specific scope and then still be able to filter results within that scope.

    ActiveAdmin.register Example do
      scope :deleted do |example|
        Example.only_deleted
      end

      scope :all do |example|
        Example.with_deleted
      end

      filter :title
      filter :description

      index do
        column :title
        column :description
      end

    end

[update]

Here’s the solution I’ve gone with. I set the with_deleted scope on the model and include filter on the side for showing/hiding deleted results. Not ideal since initially deleted results are also shown, but at least all filters can be used together.

    ActiveAdmin.register Example.with_deleted do

      filter :title
      filter :description
      filter :deleted, :as => :select, :collection => {:true => nil, :false => false }

      index do
        column :title
        column :description
      end

    end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:10:28+00:00Added an answer on June 3, 2026 at 11:10 am

    Rather than scope create another filter which will select the records on criterion based on if examples are deleted or all. And apply as many filter as you want.

    Or in filter while calculating the selector on which you will run the filter run the scope accordingly and then put the filter conditions on that selector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question: How can I achieve the model design below using ActiveAdmin and Devise 2?
I have an ActiveAdmin app with a simple model that I want to persist
I have a rails app that is using Devise, with a User model, no
I am using Ruby on Rails with Active Admin and I have one model
I have a model called user. I want to show the password field just
I'm using active admin for my rails app. I have a customer model which
I have the following setup: A model called Categories. These categories are managed using
I'm using ActiveAdmin and Formtastic. I have an invoice form that has a drop
I'm currently trying to get ActiveAdmin to work on a model of mine but
I'm using rails-settings by Squeegy from https://github.com/Squeegy/rails-settings as well as Activeadmin . What I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.