Skip to content

Commit

Permalink
Merge pull request #168 from kufu/fixes/trigger_redirect_no_login
Browse files Browse the repository at this point in the history
set full path if not login
  • Loading branch information
kinoppyd authored Apr 25, 2024
2 parents dadacee + 4e42a33 commit 4d990ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def set_locale
end

def set_last_path
session[:last_path] = request.path
session[:last_path] = request.fullpath
end

def with_time_zone(&)
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/profiles_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

class ProfilesController < ApplicationController
skip_before_action :set_last_path

def show
flash.keep if turbo_frame_request?

Expand All @@ -9,6 +11,8 @@ def show
else
@user&.profile
end

set_last_path if @profile
end

def update
Expand Down

0 comments on commit 4d990ff

Please sign in to comment.