Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move trans_sid, apply_trans_sid? from ActionController::Base to Actio…
…nController::Metal Signed-off-by: Shin-ichiro OGAWA <rust.stnard+git@gmail.com>
- Loading branch information
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test/rails/overrides/app/controllers/trans_sid_metal_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
class TransSidMetalController < ActionController::Metal | ||
include ActionController::RackDelegation | ||
include ActionController::UrlFor | ||
include ActionController::Redirecting | ||
include Rails.application.routes.url_helpers | ||
|
||
# 事前にセッションを作成しないと trans_sid が有効にならない | ||
# before_filter :session_init | ||
# trans_sid :always | ||
|
||
def redirect | ||
redirect_to('/') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters