Skip to content

Commit

Permalink
Merge pull request #21 from tungleduyxyz/kaui_issue_160
Browse files Browse the repository at this point in the history
Handle warden throw error when using ActionController::Live
  • Loading branch information
pierre authored Dec 23, 2024
2 parents 9af9ce1 + 0015d1e commit 1ebf8dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/kpm/engine_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ module KPM
class EngineController < ApplicationController
layout :get_layout

rescue_from UncaughtThrowError do |exception|
redirect_to main_app.root_path if exception.tag == :warden
end

def get_layout
layout ||= KPM.config[:layout]
end
Expand Down

0 comments on commit 1ebf8dd

Please sign in to comment.