Exception: Identifiable::Errors::ColumnMustExistInTheTableError

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

Instance Method Summary collapse

Constructor Details

#initialize(column_value, valid_columns:) ⇒ ColumnMustExistInTheTableError

Returns a new instance of ColumnMustExistInTheTableError.



20
21
22
23
# File 'lib/identifiable/errors.rb', line 20

def initialize(column_value, valid_columns:)
  column_value_string = column_value.to_s || 'nil'
  super("The identifiable's column must exist on the table for this model. You passed in #{column_value_string}, but the valid columns are: #{valid_columns}")
end