aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/inheritance.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-05-13 11:35:34 +0200
committerYves Senn <yves.senn@gmail.com>2015-05-13 11:35:34 +0200
commitf7881d3e2b87016c6788ceceda4c849ae7a0a009 (patch)
tree84b19bf333788cd2b18e81d1a3446347f9101340 /activerecord/lib/active_record/inheritance.rb
parent15354b6fd0e73a321b695ac3961eac8df9d6125d (diff)
downloadrails-f7881d3e2b87016c6788ceceda4c849ae7a0a009.tar.gz
rails-f7881d3e2b87016c6788ceceda4c849ae7a0a009.tar.bz2
rails-f7881d3e2b87016c6788ceceda4c849ae7a0a009.zip
invalid sti error message contains the full class name.
This can resolve confusing situation when a top level constant exists but a namespaced version is identified. Related to #19531.
Diffstat (limited to 'activerecord/lib/active_record/inheritance.rb')
-rw-r--r--activerecord/lib/active_record/inheritance.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/inheritance.rb b/activerecord/lib/active_record/inheritance.rb
index a7801963e8..e613d157aa 100644
--- a/activerecord/lib/active_record/inheritance.rb
+++ b/activerecord/lib/active_record/inheritance.rb
@@ -203,7 +203,7 @@ module ActiveRecord
if subclass.name != self.name
unless descendants.include?(subclass)
- raise ActiveRecord::SubclassNotFound.new("Invalid single-table inheritance type: #{subclass_name} is not a subclass of #{name}")
+ raise ActiveRecord::SubclassNotFound.new("Invalid single-table inheritance type: #{subclass.name} is not a subclass of #{name}")
end
subclass