Skip to content

Instantly share code, notes, and snippets.

@keernel
Created June 5, 2016 13:36
Show Gist options
  • Select an option

  • Save keernel/f706d1ddfb2db08c1d32e4a9932eb1ea to your computer and use it in GitHub Desktop.

Select an option

Save keernel/f706d1ddfb2db08c1d32e4a9932eb1ea to your computer and use it in GitHub Desktop.
prompt confirmation on rake tasks
STDOUT.puts "Do you wish to clean your current database? \n Please respond with 'yes' or 'no' (or 'y' or 'n'). \n"
answer = STDIN.gets.chomp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment