instance method inspect_with_attributes

Ruby on Rails 8.1.2

Since v7.2.3 Private

Available in: v7.2.3 v8.0.4 v8.1.2

Signature

inspect_with_attributes(attributes_to_list)

No documentation comment.

Parameters

attributes_to_list req
Source
# File activerecord/lib/active_record/core.rb, line 872
      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

Defined in activerecord/lib/active_record/core.rb line 872 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Core

Type at least 2 characters to search.

↑↓ navigate · open · esc close