aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-08-31 14:46:40 -0400
committerSean Griffin <sean@seantheprogrammer.com>2016-08-31 14:46:40 -0400
commit8ab9daf2803504edbd49f9c97a7f2eb484f15747 (patch)
tree7fc8e21fb8e9b48d4fa908791b00816b9c9e8dfd /activerecord/lib/active_record/core.rb
parentb347156b15aea7f6229203e0cc1a58937ecb8e93 (diff)
downloadrails-8ab9daf2803504edbd49f9c97a7f2eb484f15747.tar.gz
rails-8ab9daf2803504edbd49f9c97a7f2eb484f15747.tar.bz2
rails-8ab9daf2803504edbd49f9c97a7f2eb484f15747.zip
Include user defined attributes in inspect
The fact that this only includes column names is an oversight.
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 2725c85446..4628d7fb16 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -500,7 +500,7 @@ module ActiveRecord
# We check defined?(@attributes) not to issue warnings if the object is
# allocated but not initialized.
inspection = if defined?(@attributes) && @attributes
- self.class.column_names.collect do |name|
+ self.class.attribute_names.collect do |name|
if has_attribute?(name)
"#{name}: #{attribute_for_inspect(name)}"
end