File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33module JSONAPI
44 class ResourceControllerMetal < ActionController ::Metal
5+ # ActionController::ForceSSL was removed in Rails 8.0
6+ # It existed in Rails < 6.1, and force_ssl is now integrated into ActionController::Base
7+ FORCE_SSL_MODULE = if Gem ::Requirement . new ( '< 6.1' ) . satisfied_by? ( ActionPack . gem_version )
8+ defined? ( ActionController ::ForceSSL ) ? ActionController ::ForceSSL : nil
9+ else
10+ nil
11+ end
12+
513 MODULES = [
614 AbstractController ::Rendering ,
715 ActionController ::Rendering ,
816 ActionController ::Renderers ::All ,
917 ActionController ::StrongParameters ,
10- Gem :: Requirement . new ( '< 6.1' ) . satisfied_by? ( ActionPack . gem_version ) ? ActionController :: ForceSSL : nil ,
18+ FORCE_SSL_MODULE ,
1119 ActionController ::Instrumentation ,
1220 JSONAPI ::ActsAsResourceController
1321 ] . compact . freeze
You can’t perform that action at this time.
0 commit comments