Skip to content

Instantly share code, notes, and snippets.

@kyamaguchi
Created September 6, 2010 07:19
Show Gist options
  • Save kyamaguchi/566744 to your computer and use it in GitHub Desktop.
Save kyamaguchi/566744 to your computer and use it in GitHub Desktop.
# Show progress on rake task
def progress(char = '.')
STDOUT.write char
STDOUT.flush
end
ActiveRecord::Migration.say_with_time "Something" do
some_iteration.each do |i|
if success
progress
else
progress("X")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment