Exception class raised when raise_on_save_failure
is set and validation fails
Attributes
errors | [R] |
The |
model | [R] |
The |
Public Class methods
new(errors=nil)
[show source]
# 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