diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index d408173c01..0d9b1d4f7b 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1139,7 +1139,7 @@ module ActiveRecord #:nodoc: def id attr_name = self.class.primary_key column = column_for_attribute(attr_name) - raise ActiveRecordError, "No such primary key column #{attr_name} for table #{table_name}" if column.nil? + raise ActiveRecordError, "No such primary key column #{attr_name} for table #{self.class.table_name}" if column.nil? define_read_method(:id, attr_name, column) if self.class.generate_read_methods (value = @attributes[attr_name]) && column.type_cast(value) end |