# Conceptual help needed for controllers that work with ajax requests

**URL:** <https://www.ruby-forum.com/t/conceptual-help-needed-for-controllers-that-work-with-ajax-requests/138413>\
**Category:** Rails\
**Created:** [May 22, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/conceptual-help-needed-for-controllers-that-work-with-ajax-requests/138413 "2008-05-22T19:32:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andres](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a4c791/32.png) [@andres](https://www.ruby-forum.com/u/andres)\
**Post date:** [May 22, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/conceptual-help-needed-for-controllers-that-work-with-ajax-requests/138413/1 "2008-05-22T19:32:33Z")

</div>

Hi,

got a problem,  
I have a polymorphic object, “phone” that is created via remote  
(ajax),  
then refreshes the client\_phones div id,

But what if I need to call Phone.create from different models,  
and refresh e.g. the user\_phones div id

How do you handle rendering partials that need data generated from a  
controller different than the one calling the template?

Thanks,
