Exception: OccamsRecord::MissingColumnError

Inherits:
MissingDataError show all
Defined in:
lib/occams-record/errors.rb

Overview

Exception when an unselected column is called on a result row

Instance Attribute Summary

Attributes inherited from MissingDataError

#model_name, #name, #record

Instance Method Summary collapse

Methods inherited from MissingDataError

#initialize, #to_s

Constructor Details

This class inherits a constructor from OccamsRecord::MissingDataError

Instance Method Details

#messageString

Returns:

  • (String)


28
29
30
31
# File 'lib/occams-record/errors.rb', line 28

def message
  loads = @load_trace.to_s
  "Column '#{name}' is unavailable on #{model_name} because it was not included in the SELECT statement! Occams Record trace: #{loads}"
end