mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
Get the logic in the right order and fix variable naming (and run the tests)
This commit is contained in:
@@ -112,7 +112,7 @@ class Devise::RegistrationsController < DeviseController
|
||||
# The path used after sign up for inactive accounts. You need to overwrite
|
||||
# this method in your own RegistrationsController.
|
||||
def after_inactive_sign_up_path_for(resource)
|
||||
scope, router_name = Devise::Mapping.find_scope!(resource_or_scope, :include_router_name)
|
||||
scope, router_name = Devise::Mapping.find_scope!(resource, :include_router_name)
|
||||
context = router_name ? send(router_name) : self
|
||||
context.respond_to?(:root_path) ? context.root_path : "/"
|
||||
end
|
||||
|
||||
@@ -43,7 +43,7 @@ module Devise
|
||||
end
|
||||
raise "Could not find a valid mapping for #{obj.inspect}" unless mapping
|
||||
|
||||
return (include_router_name ? mapping.name : [mapping.name, mapping.router_name])
|
||||
return (include_router_name ? [mapping.name, mapping.router_name] : mapping.name)
|
||||
end
|
||||
|
||||
def self.find_by_path!(path, path_type=:fullpath)
|
||||
|
||||
Reference in New Issue
Block a user