Module: Utopia::Controller::Respond

Defined in:
lib/utopia/controller/respond.rb

Overview

This controller layer provides a convenient way to respond to different requested content types.

Defined Under Namespace

Modules: ClassMethods, Converter Classes: Responder

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



28
29
30
# File 'lib/utopia/controller/respond.rb', line 28

def self.prepended(base)
  base.extend(ClassMethods)
end

Instance Method Details

#passthrough(request, path) ⇒ Object

Rewrite the path before processing the request if possible.



170
171
172
173
174
# File 'lib/utopia/controller/respond.rb', line 170

def passthrough(request, path)
  if response = super
    self.class.response_for(self, request, path, response)
  end
end