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 53 def initialize(errors=nil) 54 if errors.is_a?(Sequel::Model) 55 @model = errors 56 errors = @model.errors 57 end 58 59 if errors.respond_to?(:full_messages) 60 @errors = errors 61 super(errors.full_messages.join(', ')) 62 else 63 super 64 end 65 end