Many times on a rake task it’s better to have a confirmation before continuing the task. This is especially required before important tasks like a deployment or a database migration in production.

Adding a gets doesn’t work at all. To overcome this, we can add a confirm task which is run before the actual task is run.

Continue reading