-
-
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
Scoping index action #914
Scoping index action #914
Conversation
This reverts commit c660ecd. We feel scoping should occur in the controller which is more consistent with rails and find_resource customisation
It's standard behaviour for scoping to happen in a controller. Also makes it more consistent with find_resource.
Rails 4 is failing on master as well. |
@nickcharlton FYI I am using this in a real application and it works great. Having scoping applied at the controller level is a huge improvement. Previously I was storing |
@nickcharlton any chance of a sneaky merge next week? |
Hi @damau! This is looking good. I'm going to go ahead and merge! |
@nickcharlton Awesome ! You just made our lives MUCH easier ! Thanks a lot for this. Glad to be back on |
helper_method :namespace | ||
helper_method :resource_name | ||
|
||
def dashboard_class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be delegated in the lines above, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it! I'd merge such a PR if you wanted to open one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think so. If I'm honest I'm drawing a blank as to why I even changed the "dashboard" function at all.
@nickcharlton thanks so much for the merge and all the work you put into the engine!!! |
Hi
@bobf discussed this and feel this is more of a railsy implementation for scoping the index action.
The purpose is to allow people to override the controller action
In order to manage what's displayed on the index page.
Which will certainly help Bob and I use roles within administrate.
Ta
Ad