Conditional routing#49
Merged
Merged
Conversation
Contributor
Author
|
@adammathys and @stewart how does this look? |
| skip: [:unlocks, :omniauth_callbacks], | ||
| path_names: { sign_out: 'logout' }, | ||
| path_prefix: :user | ||
| ) |
Contributor
There was a problem hiding this comment.
A small style nit - I'm never 100% sure of how to format these kinds of method calls (single-arg, then opts hash), but would prefer using an explicit hash like this:
devise_for :spree_user, {
class_name: 'Spree::User',
controllers: {
sessions: 'spree/user_sessions',
registrations: 'spree/user_registrations',
passwords: 'spree/user_passwords',
confirmations: 'spree/user_confirmations'
},
skip: [:unlocks, :omniauth_callbacks],
path_names: { sign_out: 'logout' },
path_prefix: :user
}
Contributor
Author
There was a problem hiding this comment.
I've addressed this change and force pushed.
Steps have been taken to avoid loading certain code depending on the presence of spree_frontend and spree_backend, but the routing was never updated. This change conditionally loads devise routes based on the presence of spree_frontend and spree_backend.
This brings the route definition syntax up to modern standards by using the `to` option.
Eliminate the hashrockets!
47f9839 to
1d1a60d
Compare
Contributor
|
👍 thanks, Brian! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Steps have been taken to avoid loading certain code depending on the
presence of spree_frontend and spree_backend, but the routing was never
updated. This change conditionally loads devise routes based on the
presence of spree_frontend and spree_backend.
Also updates the syntax of routing file.