class ActiveRecord::PredicateBuilder
def build(attribute, value, operator = nil)
Experimental RBS support (using type sampling data from the type_fusion
project).
type ActiveRecord__PredicateBuilder_build_value = Integer | Symbol | String | nil def build: (Arel::Attributes::Attribute attribute, ActiveRecord__PredicateBuilder_build_value value, ?false? operator) -> Arel::Nodes::Equality
This signature was generated using 7 samples from 1 application.
def build(attribute, value, operator = nil) value = value.id if value.respond_to?(:id) if operator ||= table.type(attribute.name).force_equality?(value) && :eq bind = build_bind_attribute(attribute.name, value) attribute.public_send(operator, bind) else handler_for(value).call(attribute, value) end end