# File lib/state_machine/integrations/active_model.rb, line 297 def invalidate(object, attribute, message, values = []) if supports_validations? attribute = self.attribute(attribute) options = values.inject({}) do |options, (key, value)| options[key] = value options end default_options = default_error_message_options(object, attribute, message) object.errors.add(attribute, message, options.merge(default_options)) end end