Flowdock
method

expand_from_hash

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: ActiveRecord::PredicateBuilder
expand_from_hash(attributes) protected

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 73
      def expand_from_hash(attributes)
        return ["1=0"] if attributes.empty?

        attributes.flat_map do |key, value|
          if value.is_a?(Hash) && !table.has_column?(key)
            associated_predicate_builder(key).expand_from_hash(value)
          else
            build(table.arel_attribute(key), value)
          end
        end
      end
Register or log in to add new notes.