This method is deprecated or moved on the latest stable version.
The last existing version (v4.0.2) is shown here.
column_methods_hash()
public
Returns a hash of all the methods added to query each of the columns in
the table with the name of the method as the key and true as the value.
This makes it possible to do O(1) lookups in respond_to? to check if a
given method for attribute is available.
# File activerecord/lib/active_record/model_schema.rb, line 266
def column_methods_hash #:nodoc:
@dynamic_methods_hash ||= column_names.each_with_object(Hash.new(false)) do |attr, methods|
attr_name = attr.to_s
methods[attr.to_sym] = attr_name
methods["#{attr}=".to_sym] = attr_name
methods["#{attr}?".to_sym] = attr_name
methods["#{attr}_before_type_cast".to_sym] = attr_name
end
end