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
Flexible routing scopes #1922
Flexible routing scopes #1922
Conversation
Yes, this looks great and makes sense for |
Is there a test for |
The implementation looks good, but could you please use ( About the tests, you will need to define new routes here: https://github.com/plataformatec/devise/blob/master/test/rails_app/config/routes.rb And then add new tests for these routes inside this test case (where we keep tests for authenticated, unauthenticated, and so on): https://github.com/plataformatec/devise/blob/master/test/integration/authenticatable_test.rb#L137 |
Thanks José! I added some tests and changed to the boolean logic like you mentioned. Anything else? |
Meeeeeeerged, thanks! |
👍 |
One of the things that I think could make Devise really handy, and understandable to newcomers is making scopes more flexible for constraints. Take this for example:
or
Each of these is something pretty easily understood, and would provide a bit of clarity to the routes, and clean up any before_filters that you would use instead.
I've already got a start on an implementation of this, but wanted to know if this makes sense, or maybe there is already a way to do this with Devise as it stands.