# File lib/action_view/helpers/upload_progress_helper.rb, line 378 def upload_progress_update_bar_js(percent=nil) progress = upload_progress percent ||= case when progress.nil? || !progress.started? then 0 when progress.finished? then 100 else progress.completed_percent end.to_i # TODO do animation instead of jumping "$('#{progress_bar_id}').firstChild.firstChild.style.width='#{percent}%'" end