Skip to content

Commit f732c8f

Browse files
committed
Call pending_migrations once
This was accidentally calling pending_migrations twice, and while probably not a big deal, there's no reason to.
1 parent 16ab507 commit f732c8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

activerecord/lib/active_record/migration.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,10 @@ def disable_ddl_transaction!
682682
end
683683

684684
def check_pending_migrations # :nodoc:
685-
if pending_migrations.any?
686-
raise ActiveRecord::PendingMigrationError.new(pending_migrations: pending_migrations)
685+
migrations = pending_migrations
686+
687+
if migrations.any?
688+
raise ActiveRecord::PendingMigrationError.new(pending_migrations: migrations)
687689
end
688690
end
689691

0 commit comments

Comments
 (0)