app/controllers/kryptonite/user_sessions_controller.rb in kryptonite-0.0.5 vs app/controllers/kryptonite/user_sessions_controller.rb in kryptonite-0.0.6

- old
+ new

@@ -14,12 +14,12 @@ def create @user_session = Kryptonite::UserSession.new params[:kryptonite_user_session] if @user_session.save flash[:notice] = t(:login_successful) - if params[:frontend] == "true" - redirect_to("/") + if !params[:frontend].blank? + redirect_to(params[:frontend]) else redirect_back_or_default :controller => :kryptonite, :action => :index end else render :action => :new @@ -27,11 +27,11 @@ end def destroy current_user_session.destroy flash[:notice] = t(:logout_successful) - if params[:frontend] == "true" - redirect_to("/") + if !params[:frontend].blank? + redirect_to(params[:frontend]) else redirect_back_or_default new_kryptonite_user_session_url end end \ No newline at end of file