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