method

walk_tree

rails latest stable - Class: ActiveRecord::Associations::JoinDependency
walk_tree(associations, hash)
public

No documentation available.

# File activerecord/lib/active_record/associations/join_dependency.rb, line 53
      def self.walk_tree(associations, hash)
        case associations
        when Symbol, String
          hash[associations.to_sym] ||= {}
        when Array
          associations.each do |assoc|
            walk_tree assoc, hash
          end
        when Hash
          associations.each do |k, v|
            cache = hash[k] ||= {}
            walk_tree v, cache
          end
        else
          raise ConfigurationError, associations.inspect
        end
      end