Exception: DatastaxRails::RecordInvalid

Inherits:
DatastaxRailsError show all
Defined in:
lib/datastax_rails/validations.rb

Overview

Validation exception class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordInvalid

Returns a new instance of RecordInvalid


5
6
7
8
# File 'lib/datastax_rails/validations.rb', line 5

def initialize(record)
  @record = record
  super("Invalid record: #{@record.errors.full_messages.to_sentence}")
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record


4
5
6
# File 'lib/datastax_rails/validations.rb', line 4

def record
  @record
end