Exception: Granite::Form::ObjectNotFound
- Defined in:
- lib/granite/form/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.
28 29 30 31 32 33 |
# File 'lib/granite/form/errors.rb', line 28 def initialize(object, association_name, record_id) primary_name = object.respond_to?(:_primary_name) ? object._primary_name : 'id' = "Couldn't find #{object.class.reflect_on_association(association_name).klass.name}" \ "with #{primary_name} = #{record_id} for #{object.inspect}" super() end |