Exception: Related::ValidationsFailed

Inherits:
RelatedException show all
Defined in:
lib/related/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ ValidationsFailed

Returns a new instance of ValidationsFailed.



7
8
9
10
11
# File 'lib/related/exceptions.rb', line 7

def initialize(object)
  @object = object
  errors = @object.errors.full_messages.to_sentence
  super(errors)
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



6
7
8
# File 'lib/related/exceptions.rb', line 6

def object
  @object
end