Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
1bbcd71c
Commit
1bbcd71c
authored
8 years ago
by
Eugen Rochko
Browse files
Options
Downloads
Patches
Plain Diff
Fix #390 - fix redirect after sign-up (to login page instead of homepage)
parent
18f59df0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/auth/registrations_controller.rb
+4
-0
4 additions, 0 deletions
app/controllers/auth/registrations_controller.rb
spec/controllers/auth/registrations_controller_spec.rb
+2
-2
2 additions, 2 deletions
spec/controllers/auth/registrations_controller_spec.rb
with
6 additions
and
2 deletions
app/controllers/auth/registrations_controller.rb
+
4
−
0
View file @
1bbcd71c
...
...
@@ -23,6 +23,10 @@ class Auth::RegistrationsController < Devise::RegistrationsController
new_user_session_path
end
def
after_inactive_sign_up_path_for
(
_resource
)
new_user_session_path
end
def
check_single_user_mode
redirect_to
root_path
if
Rails
.
configuration
.
x
.
single_user_mode
end
...
...
This diff is collapsed.
Click to expand it.
spec/controllers/auth/registrations_controller_spec.rb
+
2
−
2
View file @
1bbcd71c
...
...
@@ -20,8 +20,8 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
post
:create
,
params:
{
user:
{
account_attributes:
{
username:
'test'
},
email:
'test@example.com'
,
password:
'12345678'
,
password_confirmation:
'12345678'
}
}
end
it
'redirects to
home
page'
do
expect
(
response
).
to
redirect_to
root
_path
it
'redirects to
login
page'
do
expect
(
response
).
to
redirect_to
new_user_session
_path
end
it
'creates user'
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment