method
render_bind
v7.1.3.4 -
Show latest stable
- Class:
ActiveRecord::Explain
render_bind(attr)private
No documentation available.
# 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