class ActiveInteraction::Filter::Error

A validation error that occurs while processing the filter.

Attributes

filter[R]

The filter the error occured on.

@return [ActiveInteraction::Filter]

name[R]

The name of the error.

@return [Symbol]

options[R]

Options passed to the error for error message creation.

@return [Hash]

type[R]

The type of error.

@return [Symbol]

Public Class Methods

new(filter, type, name: nil) click to toggle source

@private

# File lib/active_interaction/filter/error.rb, line 10
def initialize(filter, type, name: nil)
  @filter = filter
  @name = name || filter.name
  @type = type

  @options = {}
  options[:type] = I18n.translate("#{Base.i18n_scope}.types.#{filter.class.slug}") if type == :invalid_type
end