diff options
author | Xavier Noria <fxn@hashref.com> | 2013-07-16 14:19:24 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-07-16 17:27:58 +0200 |
commit | 9eb0cd28c95aaf81db1cc2da1943fda82bb4aa8b (patch) | |
tree | d341d7efe7f68b32ff2de6a0d16b1436becc14e8 /activerecord/lib/active_record | |
parent | 1555a1800ea550a991eb57ce1ec8236bdba0365a (diff) | |
download | rails-9eb0cd28c95aaf81db1cc2da1943fda82bb4aa8b.tar.gz rails-9eb0cd28c95aaf81db1cc2da1943fda82bb4aa8b.tar.bz2 rails-9eb0cd28c95aaf81db1cc2da1943fda82bb4aa8b.zip |
removes the obsolete private method column_methods_hash [Closes #11406]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/model_schema.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index ac2d2f2712..44ea8610f2 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -253,19 +253,6 @@ module ActiveRecord @content_columns ||= columns.reject { |c| c.primary || c.name =~ /(_id|_count)$/ || c.name == inheritance_column } end - # 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. - 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 - # Resets all the cached information about columns, which will cause them # to be reloaded on the next request. # |