Exception: Mack::Errors::InvalidRenderType

Inherits:
StandardError
  • Object
show all
Defined in:
lib/errors/errors.rb

Overview

Raised when an action returns something other then a string.

Example:

class FooController < Mack::Controller::Base
  def index
    [1,2,3,4]
  end
end

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ InvalidRenderType

Takes the Class you are trying to render.



26
27
28
# File 'lib/errors/errors.rb', line 26

def initialize(klass)
  super("You can not render a #{klass}! It must be a String.")
end