class SimpleJsonapi::DuplicateResourceError
The error raised when the same resource is added to the included
member twice.
Attributes
id[R]
type[R]
Public Class Methods
new(type, id, msg = nil)
click to toggle source
@param type [String] @param id [String] @param msg [String]
# File lib/simple_jsonapi/helpers/exceptions.rb, line 13 def initialize(type, id, msg = nil) @type = type @id = id @msg = msg end
Public Instance Methods
to_s()
click to toggle source
# File lib/simple_jsonapi/helpers/exceptions.rb, line 19 def to_s @msg.present? ? @msg : "Resource with type #{type} and id #{id} is already included" end