fixed issue where settings page was redirecting to nonexistent user profile page

This commit is contained in:
Connor Turland 2014-01-28 23:53:13 -05:00
parent fbdfff6b83
commit efcc449471
2 changed files with 3 additions and 6 deletions

View file

@ -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

View file

@ -2,10 +2,7 @@ class UsersController < ApplicationController
before_filter :require_user, only: [:edit, :update]
respond_to :html, :json
autocomplete :user, :name, :full => true
respond_to :html, :json
# GET /user/edit
def edit
@ -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