method

inspect_with_attributes

rails latest stable - Class: ActiveRecord::Core

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

inspect_with_attributes(attributes_to_list)
private

No documentation available.

# File activerecord/lib/active_record/core.rb, line 856
      def inspect_with_attributes(attributes_to_list)
        inspection = if @attributes
          attributes_to_list.filter_map do |name|
            name = name.to_s
            if _has_attribute?(name)
              "#{name}: #{attribute_for_inspect(name)}"
            end
          end.join(", ")
        else
          "not initialized"
        end

        "#<#{self.class} #{inspection}>"
      end