Class: SharkOnLambda::BaseController

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

Direct Known Subclasses

JsonapiController

Constant Summary collapse

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

  ActionController::UrlFor,
  ActionController::ConditionalGet,
  ActionController::EtagWithTemplateDigest,
  ActionController::EtagWithFlash,
  ActionController::Caching,
  ActionController::MimeResponds,
  ActionController::ImplicitRender,
  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



31
32
33
34
35
36
37
# File 'lib/shark_on_lambda/base_controller.rb', line 31

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

Instance Method Details

#redirect_toObject



39
40
41
42
# File 'lib/shark_on_lambda/base_controller.rb', line 39

def redirect_to(*)
  super
  self.response_body = '' if no_body?
end