lib/plezi/helpers/http_sender.rb in plezi-0.12.14 vs lib/plezi/helpers/http_sender.rb in plezi-0.12.15
- old
+ new
@@ -1,10 +1,15 @@
module Plezi
module Base
+
# Sends common basic HTTP responses.
module HTTPSender
- class ErrorCtrl
+ # makes sure to methods are injected to class Class
+ class Container
+ end
+ # the Error Controller, for rendering error templates.
+ class ErrorCtrl < Container
include ::Plezi::Base::ControllerCore
include ::Plezi::ControllerMagic
def index
render(response.status.to_s) || (params[:format] && (params[:format] != 'html'.freeze) && render(response.status.to_s, format: 'html'.freeze)) || ((response['content-type'.freeze] = 'text/plain'.freeze) && response.class::STATUS_CODES[response.status])