method

select

rails latest stable - Class: ActiveRecord::LazyAttributeHash

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

select()
public

No documentation available.

# File activerecord/lib/active_record/attribute_set/builder.rb, line 58
    def select
      keys = types.keys | values.keys | delegate_hash.keys
      keys.each_with_object({}) do |key, hash|
        attribute = self[key]
        if yield(key, attribute)
          hash[key] = attribute
        end
      end
    end