    # File lib/active_record/validations.rb, line 65
          def generate_message(options = {})
            keys = @base.class.self_and_descendants_from_active_record.map do |klass|
              [ "models.#{klass.name.underscore}.attributes.#{attribute}.#{@message}""models.#{klass.name.underscore}.attributes.#{attribute}.#{@message}",
                "models.#{klass.name.underscore}.#{@message}""models.#{klass.name.underscore}.#{@message}" ]
            end.flatten

            keys << options.delete(:default)
            keys << "messages.#{@message}""messages.#{@message}"
            keys << @message if @message.is_a?(String)
            keys << @type unless @type == @message
            keys.compact!

            options.merge!(:default => keys)
            I18n.translate(keys.shift, options)
          end