class TinyDyno::Errors::InvalidValueType

This error is raised, when a query is performed with fields specified that are not HashKeys, which would result in a table scan

Public Class Methods

new(klass:, name:, value:) click to toggle source

Create the new error.

@example Instantiate the error.

InvalidSelector.new(Person, "gender")

@param [ Class ] klass The model class. @param [ String, Symbol ] name The name of the attribute.

@since 3.0.0

Calls superclass method
# File lib/tiny_dyno/errors/invalid_type_error.rb, line 18
def initialize(klass:, name:, value:)
  super(
      compose_message("value_not_typecasted", { klass: klass.name, name: name, value: value })
  )
end