Skip to content

Commit

Permalink
Merge pull request rails#21283 from ravindrakumawat/add_docs_for_pend…
Browse files Browse the repository at this point in the history
…ing_migration

Add Docs for ActiveRecord #check_pending [ci skip]
  • Loading branch information
senny committed Aug 18, 2015
2 parents 57498e6 + 8bd064e commit 2a2473f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions activerecord/lib/active_record/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ class << self
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
Expand Down

0 comments on commit 2a2473f

Please sign in to comment.