# Link\_to\_remote undefined within controller?

**URL:** <https://www.ruby-forum.com/t/link-to-remote-undefined-within-controller/68503>\
**Category:** Rails\
**Created:** [September 13, 2006, 6:52am UTC](https://www.ruby-forum.com/t/link-to-remote-undefined-within-controller/68503 "2006-09-13T06:52:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 13, 2006, 6:52am UTC](https://www.ruby-forum.com/t/link-to-remote-undefined-within-controller/68503/1 "2006-09-13T06:52:58Z")

</div>

I can’t seem to use ActionView::Helpers::PrototypeHelpers from a  
controller - specifically, I’m trying to use the link\_to\_remote helper  
to create an Ajax link from within a controller function called from a  
previous link\_to\_remote call.

The error is:  
undefined method `link\_to\_remote’ for #MatchController:0x35e3370

If I try to import the PrototypeHelpers module, instead I get:  
undefined method `options\_for\_javascript’ for  
#MatchController:0x35f94f4

Any thoughts?

Thanks,  
ben

---

<div class="post-metadata">

**Author:** ![blacknight](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c68b51/32.png) [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Post date:** [September 13, 2006, 2:43pm UTC](https://www.ruby-forum.com/t/link-to-remote-undefined-within-controller/68503/2 "2006-09-13T14:43:13Z")

</div>

That’s by design. You should really have a partial that gets rendered  
from  
your controller. The partial would contain the link\_to\_remote.
