mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
98ee2a40bf
Prior to this commit, queries specifying objects as values like `where(id: user)` and `where(author: user)` would only successfully serialize to a SQL query if the value (i.e. `user` in the case of these examples) were an instance of an `ActiveRecord::Base` descendant. In applications that use decorators (either via `SimpleDelegator`, `delegate_missing_to`, or other means), this required conversion can be burdensome. This commit modifies the `PredicateBuilder`, replacing class based comparison conditionals with calls to `#respond_to?`. |
||
---|---|---|
.. | ||
batches | ||
predicate_builder | ||
batches.rb | ||
calculations.rb | ||
delegation.rb | ||
finder_methods.rb | ||
from_clause.rb | ||
merger.rb | ||
predicate_builder.rb | ||
query_attribute.rb | ||
query_methods.rb | ||
record_fetch_warning.rb | ||
spawn_methods.rb | ||
where_clause.rb |