• S
    #where fails if opts.responds_to?(:==) unexpectedly · c431f175
    Samuel Williams 提交于
    Sometimes opts passed in might respond to ==, e.g. `Arel::Nodes::Grouping`. In this case, `opts == :chain` returns `Arel::Nodes::Equality` which causes odd behaviour. Prefer `if :chain == opts` which guarantees that `Symbol#==` would be invoked. Alternatively consider `eql?`.
    c431f175
query_methods.rb 36.9 KB