class Sequel::ValidationFailed
Exception class raised when raise_on_save_failure
is set and
validation fails
Attributes
errors[R]
The Sequel::Model::Errors object related to this exception.
model[R]
The Sequel::Model object related to this exception.
Public Class Methods
new(errors=nil)
click to toggle source
Calls superclass method
# File lib/sequel/model/exceptions.rb, line 45 def initialize(errors=nil) if errors.is_a?(Sequel::Model) @model = errors errors = @model.errors end if errors.respond_to?(:full_messages) @errors = errors super(errors.full_messages.join(', ')) else super end end