Exception: ActiveData::ObjectNotFound
- Inherits:
-
ActiveDataError
- Object
- StandardError
- ActiveDataError
- ActiveData::ObjectNotFound
- Defined in:
- lib/active_data/errors.rb
Instance Method Summary collapse
-
#initialize(object, association_name, record_id) ⇒ ObjectNotFound
constructor
A new instance of ObjectNotFound.
Constructor Details
#initialize(object, association_name, record_id) ⇒ ObjectNotFound
Returns a new instance of ObjectNotFound.
41 42 43 44 45 |
# File 'lib/active_data/errors.rb', line 41 def initialize(object, association_name, record_id) = "Couldn't find #{object.class.reflect_on_association(association_name).klass.name}" \ "with #{object.respond_to?(:_primary_name) ? object._primary_name : 'id'} = #{record_id} for #{object.inspect}" super end |