1
0
Fork 0
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:
ravindra kumar kumawat 2015-08-18 11:13:15 +05:30
parent 6e83a133f7
commit 8bd064ec2b

View file

@ -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