# Upload progress update bar question

**URL:** <https://www.ruby-forum.com/t/upload-progress-update-bar-question/78589>\
**Category:** Rails\
**Created:** [March 8, 2006, 7:02pm UTC](https://www.ruby-forum.com/t/upload-progress-update-bar-question/78589 "2006-03-08T19:02:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [March 8, 2006, 7:02pm UTC](https://www.ruby-forum.com/t/upload-progress-update-bar-question/78589/1 "2006-03-08T19:02:50Z")

</div>

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 =\> “”, :layout =\> false  
end

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [March 8, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/upload-progress-update-bar-question/78589/2 "2006-03-08T19:04:40Z")

</div>

OK I just realized a fundamental misunderstanding that I had - that the  
controller was invoking the helper, which of course it isn’t.

So now I just have to figure out why the helper class can’t be found.

WG

Wes G. wrote:

> 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 =\> “”, :layout =\> false  
> end

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [March 8, 2006, 9:28pm UTC](https://www.ruby-forum.com/t/upload-progress-update-bar-question/78589/3 "2006-03-08T21:28:26Z")

</div>

There’s an error in the documentation - the method name is

upload\_progress\_update\_bar\_js

How do I report a doc. error like this?

Wes

Wes G. wrote:

> OK I just realized a fundamental misunderstanding that I had - that the  
> controller was invoking the helper, which of course it isn’t.
> 
> So now I just have to figure out why the helper class can’t be found.
> 
> WG
> 
> Wes G. wrote:
> 
> > 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 =\> “”, :layout =\> false  
> > end
