class SharkOnLambda::BaseController

Constants

EXCLUDED_MODULES

Public Class Methods

dispatch(*) click to toggle source
Calls superclass method
# 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

Public Instance Methods

redirect_to(*) click to toggle source
Calls superclass method
# File lib/shark_on_lambda/base_controller.rb, line 49
def redirect_to(*)
  super

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

Private Instance Methods

no_body?() click to toggle source
# File lib/shark_on_lambda/base_controller.rb, line 57
def no_body?
  response.status.in?(Response::NO_CONTENT_CODES)
end