Exception: Hanami::View::UnknownRenderTypeError

Inherits:
Error
  • Object
show all
Defined in:
lib/hanami/view/errors.rb

Overview

Unknown or render type

This is raised at the runtime when ‘Hanami::Layout` doesn’t recognize the render type.

Since:

  • 1.1.0

Instance Method Summary collapse

Constructor Details

#initialize(known_types, supplied_options) ⇒ UnknownRenderTypeError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of UnknownRenderTypeError.

Since:

  • 1.1.0



59
60
61
62
63
# File 'lib/hanami/view/errors.rb', line 59

def initialize(known_types, supplied_options)
  known_types_list = known_types.map{|t| "':#{t}'"}.join(', ')
  supplied_options_list = supplied_options.keys.map{|t| "':#{t}'"}.join(', ')
  super("Calls to `render` in a layout must include one of #{known_types_list}. Found #{supplied_options_list}.")
end