-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unscoping default scope #731
Comments
I had a look at this yesterday and it doesn't seem possible (yet). The list of resources is provided by |
@nickcharlton The solution looks good to me. What about it are you unhappy with ? Seems the simplest way to give complete control. My use case is that I only want to display a specific scope. Curiously, the controller generator suggests that it's possible, but it's clear from looking at the code that this can't work: # To customize the behavior of this controller,
# simply overwrite any of the RESTful actions. For example:
#
# def index
# super
# @resources = Role.
# page(params[:page]).
# per(10)
# end |
@nickcharlton Your patch seems to work fine for me - just tested my code against it with no issues at all. +1 for merging. :) |
This allows you to add custom filtering (or disable default filtering) such as used with default scopes.
I've added this PR which resolves the issue for me and (I think) resolves the issue that @nickcharlton found with his WIP implementation: #910 I'm using it for the time being so I can at least rebase against the latest thoughtbot master and stay up-to-date on features but would love to see it merged so I'm happy to make any changes that would help make that happen. |
I have a model with a default scope:
default_scope -> { where(active: true) }
Can I unscope the model in Administrate, so the I can see all the records in the admin panel?
The text was updated successfully, but these errors were encountered: