method

render_bind

rails latest stable - Class: ActiveRecord::StructuredEventSubscriber

Method not available on this version

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

render_bind(attr, value)
private

No documentation available.

# File activerecord/lib/active_record/structured_event_subscriber.rb, line 64
      def render_bind(attr, value)
        case attr
        when ActiveModel::Attribute
          if attr.type.binary? && attr.value
            value = "<#{attr.value_for_database.to_s.bytesize} bytes of binary data>"
          end
        when Array
          attr = attr.first
        else
          attr = nil
        end

        [attr&.name, value]
      end