module ActiveSupport::ActionableError::ClassMethods

def action(name, &block)

end
end
ActiveRecord::Tasks::DatabaseTasks.migrate
action "Run pending migrations" do

include ActiveSupport::ActionableError
class PendingMigrationError < MigrationError

Defines an action that can resolve the error.
def action(name, &block)
  _actions[name] = block
end