Radhika
Radhika

Reputation: 2561

Hide Active Admin scope tab

In Active Admin, I have added a scope for a particular model. I want to use the scope to filter results but since it is a single scope I dont want the tab to be shown on the top of the page. Is there a way to hide the tab on the UI?

Upvotes: 0

Views: 1215

Answers (1)

Josh Kovach
Josh Kovach

Reputation: 7749

If it's supposed to be your default scope and there are no others, you can use scope_to, or you can override scoped_collection, both of which are documented here.

For example:

controller do
  def scoped_collection
    super.my_scope
  end
end

Upvotes: 2

Related Questions