fixed issue where settings page was redirecting to nonexistent user profile page
This commit is contained in:
parent
fbdfff6b83
commit
efcc449471
2 changed files with 3 additions and 6 deletions
|
@ -33,7 +33,7 @@ private
|
|||
def require_user
|
||||
unless authenticated?
|
||||
flash[:warning] = "You must be logged in."
|
||||
store and redirect_to new_session_path
|
||||
store_location and redirect_to new_user_session_path
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,9 +4,6 @@ class UsersController < ApplicationController
|
|||
|
||||
respond_to :html, :json
|
||||
|
||||
autocomplete :user, :name, :full => true
|
||||
|
||||
|
||||
# GET /user/edit
|
||||
def edit
|
||||
@user = current_user
|
||||
|
@ -24,7 +21,7 @@ class UsersController < ApplicationController
|
|||
|
||||
@user.save
|
||||
|
||||
respond_with(@user, location: user_url(@user)) do |format|
|
||||
respond_with(@user, location: session[:previous_url]) do |format|
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue