Class: LittleMapper::Result::RepoFailure

Inherits:
RepoResult
  • Object
show all
Defined in:
lib/little_mapper/result/repo_failure.rb

Instance Attribute Summary

Attributes inherited from RepoResult

#messages, #object

Instance Method Summary collapse

Methods inherited from RepoResult

#initialize, #success?

Constructor Details

This class inherits a constructor from LittleMapper::Result::RepoResult

Instance Method Details

#after_initializeObject



4
5
6
7
8
# File 'lib/little_mapper/result/repo_failure.rb', line 4

def after_initialize
  if object && object.respond_to?(:errors)
    @messages = object.errors.full_messages
  end
end