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 def require_user
unless authenticated? unless authenticated?
flash[:warning] = "You must be logged in." 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 return false
end end
end end

View file

@ -2,10 +2,7 @@ class UsersController < ApplicationController
before_filter :require_user, only: [:edit, :update] before_filter :require_user, only: [:edit, :update]
respond_to :html, :json respond_to :html, :json
autocomplete :user, :name, :full => true
# GET /user/edit # GET /user/edit
def edit def edit
@ -24,7 +21,7 @@ class UsersController < ApplicationController
@user.save @user.save
respond_with(@user, location: user_url(@user)) do |format| respond_with(@user, location: session[:previous_url]) do |format|
end end
end end