Flowdock
method

resolve_column_aliases

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: TableMetadata
resolve_column_aliases(hash) 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/table_metadata.rb, line 12
    def resolve_column_aliases(hash)
      # This method is a hot spot, so for now, use Hash[] to dup the hash.
      #   https://bugs.ruby-lang.org/issues/7166
      new_hash = Hash[hash]
      hash.each do |key, _|
        if (key.is_a?(Symbol)) && klass.attribute_alias?(key)
          new_hash[klass.attribute_alias(key)] = new_hash.delete(key)
        end
      end
      new_hash
    end
Register or log in to add new notes.