From e4701e613c9fcbbec7fed51447f512d1b9347f17 Mon Sep 17 00:00:00 2001 From: Benjamin Quorning Date: Tue, 24 May 2016 13:16:40 +0200 Subject: [PATCH] [] and read_attribute are not aliases [ci skip] The `#[]` method *used to be* an alias of `#read_attribute`, but since Rails 4 (10f6f90d9d1bbc9598bffea90752fc6bd76904cd), it will raise an exception for missing attributes. Saying that it is an alias is confusing. --- activerecord/lib/active_record/attribute_methods.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 7e19dceaed..1fb5eb28cd 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -334,8 +334,6 @@ module ActiveRecord # # Note: +:id+ is always present. # - # Alias for the #read_attribute method. - # # class Person < ActiveRecord::Base # belongs_to :organization # end