ActiveInteraction and a big amount of other frameworks are using ActiveModel::Errors to implement errors.
When combined with other gems or frameworks that are using ActiveModel it is difficult to find out what class have called
ActiveModel::Errors.new(self). For example the following case:
class Errors < ActiveModel::Errors
if other_instance_of_active_model_errors.called_by? User # User is an ActiveRecord::Base
# Use ActiveModel’s error translations
# Do magic to decide what translations to use
That is why I propose to expose something like
caller.class == klass
Not sure about the name of method however.
Thanks in advance,