mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #21283 from ravindrakumawat/add_docs_for_pending_migration
Add Docs for ActiveRecord #check_pending [ci skip]
This commit is contained in:
commit
2a2473fd71
1 changed files with 1 additions and 0 deletions
|
@ -376,6 +376,7 @@ module ActiveRecord
|
|||
attr_accessor :delegate # :nodoc:
|
||||
attr_accessor :disable_ddl_transaction # :nodoc:
|
||||
|
||||
# Raises <tt>ActiveRecord::PendingMigrationError</tt> error if any migrations are pending.
|
||||
def check_pending!(connection = Base.connection)
|
||||
raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?(connection)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue