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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.