method
render_bind
v8.1.1 -
Show latest stable
- Class:
ActiveRecord::Explain
render_bind(connection, attr)private
No documentation available.
# File activerecord/lib/active_record/explain.rb, line 40
def render_bind(connection, 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