module Motorhead::AbstractController

Public Instance Methods

send_action(*) click to toggle source
Calls superclass method
# File lib/motorhead/abstract_controller.rb, line 25
def send_action(*)
  case self
  when Motorhead::Controller
    begin
      super
      @_motorhead_action_successfully_finished = true
      request.env['motorhead_view_assigns'] = view_assigns
    rescue => e
      (self.class.parent::Engine.on_error || Motorhead.config.on_error).call(e)
    end
  when ::ActionController::Base
    if request.env.key? 'motorhead_render_result'
      self.response = request.env.delete 'motorhead_render_result'
      headers.delete 'X-Cascade'
      self.response_body = response.body
    else
      super
    end
  else  # ActionMailer::Base
    super
  end
end