Exception: StrongResources::UnregisteredType

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

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ UnregisteredType

Returns a new instance of UnregisteredType.



25
26
27
# File 'lib/strong_resources.rb', line 25

def initialize(type)
  @type = type
end

Instance Method Details

#messageObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/strong_resources.rb', line 29

def message
  <<-MSG
Type "#{@type}" was not found!

This is the right-hand side of your strong_resource attributes.

See the list of default types, and directions on how to register custom
types, here: https://jsonapi-suite.github.io/strong_resources/#default-types
  MSG
end