E
E
Evgeny Strashko2015-03-31 21:56:54
Ruby on Rails
Evgeny Strashko, 2015-03-31 21:56:54

How to create a progress bar for a Rails background process?

Hello, tell me how to parviliy make a progress bar? I tried gem progress_job, it didn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IgorVol, 2016-12-21
@IgorVol

You need progress_bar
It 's easy to use.

require 'progress_bar'
users = User.all
bar = ProgressBar.new(users.count)

users.each do |user| 
  user.update_attributes ....
  bar.increment!
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question