0

I am sending push notification to some user set on creation of question. I want to add progress bar so that user can see loading , when questions sent it should stop progress bar. I am not finding any way to do this in active admin. Following is my code :

    def create
        question=PsychographicsQuestion.create(permitted_params["psychographics_question"])

        for u in @@users
            send_msg_through_gcm(u.to_i,"New PsychoGraphics question has been added.")
        end

        redirect_to admin_psychographics_question_path(:id=>question.id)
    end
Hassan Munir
  • 419
  • 7
  • 24
  • See https://stackoverflow.com/questions/43462860/rails-draw-progress-bar-instead-of-integer-value Bootstrap provides a good solution. – Piers C May 23 '17 at 14:04

1 Answers1

4

I think there are no any gem/js library to support. You have to do it on your own. Get the time for showing the notification, use any progress bar and maintain it with js. Either you can do it as show slowly 50% of the progress of the bar and when you get the success response make it faster to complete the bar. [I did't find anything like that to maintain progress bar in rails upload/loading ]

Ahsan
  • 640
  • 6
  • 17