Exception: Tripod::Errors::Validations

Inherits:
StandardError
  • Object
show all
Defined in:
lib/tripod/errors/validations.rb

Overview

Raised when a persistence method ending in ! fails validation. The message will contain the full error messages from the Resource in question.

Examples:

Create the error.

Validations.new(person.errors)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ Validations

Returns a new instance of Validations.



13
14
15
# File 'lib/tripod/errors/validations.rb', line 13

def initialize(resource)
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly) Also known as: record

Returns the value of attribute resource.



10
11
12
# File 'lib/tripod/errors/validations.rb', line 10

def resource
  @resource
end