[Rails] Upload progress update bar question

Wes Gamble
Wed, 08 Mar 2006 18:02:54 -0000

I''m trying to follow these instructions to include the Javascript
progress bar on a page.  However, I''m confused.

In my controller, when I try to access

   update_upload_progress_bar_js

which is defined in

   actionpack/lib/action_view/helpers/upload_progress_helper.rb

I get a "no such method" error.

Can I use helpers in my controller class and, if so, how do I access
them?

Thanks,
Wes

========================================================
upload_progress_update_bar_js(percent=nil)

Javascript helper that will create a script that will change the width
of the background progress bar container. Include this in the script
portion of your view rendered by your upload_status action to
automatically find and update the progress bar.

Example (in controller):

  def upload_status
render :inline => " <%=
update_upload_progress_bar_js
%> ", :layout => false
  end