Class: SharkOnLambda::BaseController

Inherits:
ActionController::Metal
  • Object
show all
Defined in:
lib/shark_on_lambda/base_controller.rb

Constant Summary collapse

EXCLUDED_MODULES =
[
  AbstractController::Translation,
  AbstractController::AssetPaths,

  ActionController::Cookies,
  ActionController::Flash,
  ActionController::FormBuilder,
  ActionController::RequestForgeryProtection,
  ActionController::ContentSecurityPolicy,
  ActionController::ForceSSL,
  ActionController::HttpAuthentication::Basic::ControllerMethods,
  ActionController::HttpAuthentication::Digest::ControllerMethods,
  ActionController::HttpAuthentication::Token::ControllerMethods,
  ActionView::Layouts
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dispatchObject



41
42
43
44
45
46
47
# File 'lib/shark_on_lambda/base_controller.rb', line 41

def self.dispatch(*)
  super
rescue AbstractController::ActionNotFound,
       AbstractController::DoubleRenderError,
       ActionController::ActionControllerError => e
  raise Errors[500], e.message
end

Instance Method Details

#redirect_toObject



49
50
51
52
53
# File 'lib/shark_on_lambda/base_controller.rb', line 49

def redirect_to(*)
  super

  self.response_body = no_body? ? nil : { data: {} }.to_json
end