Exception: InvalidSchemaError
- Inherits:
-
StandardError
- Object
- StandardError
- InvalidSchemaError
- Defined in:
- lib/relation_to_json.rb
Instance Method Summary collapse
-
#initialize(invalid_attributes, klass) ⇒ InvalidSchemaError
constructor
A new instance of InvalidSchemaError.
- #message ⇒ Object
Constructor Details
#initialize(invalid_attributes, klass) ⇒ InvalidSchemaError
Returns a new instance of InvalidSchemaError.
8 9 10 11 |
# File 'lib/relation_to_json.rb', line 8 def initialize(invalid_attributes, klass) @invalid_attributes = invalid_attributes @klass = klass end |
Instance Method Details
#message ⇒ Object
13 14 15 |
# File 'lib/relation_to_json.rb', line 13 def "The attributes: #{@invalid_attributes} do not exist on the model: #{@klass.name}, which has attributes #{@klass.column_names}" end |