method

references

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::PredicateBuilder
references(attributes) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/predicate_builder.rb, line 28
    def self.references(attributes)
      attributes.each_with_object([]) do |(key, value), result|
        if value.is_a?(Hash)
          result << Arel.sql(key)
        elsif (idx = key.rindex("."))
          result << Arel.sql(key[0, idx])
        end
      end
    end
Register or log in to add new notes.