# AJAX + RJS across controllers

**URL:** <https://www.ruby-forum.com/t/ajax-rjs-across-controllers/114552>\
**Category:** Rails\
**Created:** [September 14, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/ajax-rjs-across-controllers/114552 "2007-09-14T22:40:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnstevenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Post date:** [September 14, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/ajax-rjs-across-controllers/114552/1 "2007-09-14T22:40:07Z")

</div>

Here’s the scenario… there are a lot of models in use in this one  
controller, so I want to separate responsibility for remote calls into  
different controllers.

some\_controller has a view with a list of Foo objects.  
some\_controller has a form to create a new Foo object.  
some\_controller has an RJS template for the add\_foo action to update its  
view.

foo\_ajax\_controller has an add\_foo action.

Is there a way that some\_controller can invoke  
foo\_ajax\_controller#add\_foo, and have it render some\_controller’s  
‘add\_foo.rjs’?
