From 6e49cc77ab3d16c06e12f93158eaf3e507d4120e Mon Sep 17 00:00:00 2001
From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com>
Date: Tue, 24 Jan 2017 14:09:54 +0900
Subject: show correct class name in migration inherited directly error

Follow up to 249f71a
---
 activerecord/lib/active_record/migration.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activerecord/lib')

diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 339332a60d..40f6226315 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -525,7 +525,7 @@ module ActiveRecord
         raise StandardError, "Directly inheriting from ActiveRecord::Migration is not supported. " \
           "Please specify the Rails release the migration was written for:\n" \
           "\n" \
-          "  class #{self.class.name} < ActiveRecord::Migration[4.2]"
+          "  class #{subclass} < ActiveRecord::Migration[4.2]"
       end
     end
 
-- 
cgit v1.2.3