Currently, when you include Virtus.model(strict: true), and you fail to supply any of the attributes, the exception message doesn't let you know which attribute was missing. This can lead to painful debugging sessions, particularly when a model embeds other models.
This pull request attempts to address that by providing visibility into the name of the attribute that could not be coerced. Since not all Virtus::Attribute instances actually have a name, we fall back to the old message when one isn't present.
Resolves #254
Currently, when you
include Virtus.model(strict: true)
, and you fail to supply any of the attributes, the exception message doesn't let you know which attribute was missing. This can lead to painful debugging sessions, particularly when a model embeds other models.This pull request attempts to address that by providing visibility into the name of the attribute that could not be coerced. Since not all
Virtus::Attribute
instances actually have a name, we fall back to the old message when one isn't present.