method

render_bind

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: Explain
render_bind(attr) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/explain.rb, line 39
      def render_bind(attr)
        if ActiveModel::Attribute === attr
          value = if attr.type.binary? && attr.value
            "<#{attr.value_for_database.to_s.bytesize} bytes of binary data>"
          else
            connection.type_cast(attr.value_for_database)
          end
        else
          value = connection.type_cast(attr)
          attr  = nil
        end

        [attr&.name, value]
      end
Register or log in to add new notes.