# Synchron user-request without reloading the site or the controller

**URL:** <https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003>\
**Category:** Rails\
**Created:** [July 31, 2009, 4:31am UTC](https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003 "2009-07-31T04:31:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 31, 2009, 4:31am UTC](https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003/1 "2009-07-31T04:31:51Z")

</div>

Hello,

I have a controller which gets some data from a user (through a form)  
and the it compute the user data and get an result. Depends on the  
result I want to make a request (for example: a simple popup) and the  
user type into the popup simple data (some numerary) and then the  
request return the value back to the controller and the controller can  
continue computing with the new data (numerary) and generate the end  
result. At the end the view will be generated with access to the end  
result.

Is this possible to implement an user requst while the controller is  
computing and before the view will generated?

Thanks  
Timaschew

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 31, 2009, 5:55am UTC](https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003/2 "2009-07-31T05:55:25Z")

</div>

removed\_email\_address@domain.invalid  
[…]

> Is this possible to implement an user requst while the controller is  
> computing and before the view will generated?

Not as such, but the functionality you envision is certainly possible.  
Basically, it works like this: the controller determines (or asks the  
model to determine) if additional input is needed from the user. If so,  
it renders one view template; if not, it renders another.

The point is that (barring client-side JavaScript) no rendering is  
possible without involving the view. Nor should it be.

> Thanks  
> Timaschew

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 31, 2009, 5:55am UTC](https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003/3 "2009-07-31T05:55:33Z")

</div>

On Jul 30, 8:18 pm, “removed\_email\_address@domain.invalid”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is this possible to implement an user requst while the controller is  
> computing and before the view will generated?

Not really - that’s just not how web apps wortk in general.

Fred
