# One view, many actions

**URL:** <https://www.ruby-forum.com/t/one-view-many-actions/120694>\
**Category:** Rails\
**Created:** [November 19, 2007, 9:47pm UTC](https://www.ruby-forum.com/t/one-view-many-actions/120694 "2007-11-19T21:47:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fixxxer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fixxxer](https://www.ruby-forum.com/u/fixxxer)\
**Post date:** [November 19, 2007, 9:47pm UTC](https://www.ruby-forum.com/t/one-view-many-actions/120694/1 "2007-11-19T21:47:33Z")

</div>

Hi all,  
I’ve got a view named “prompt.rhtml” and a controller named “customer”  
with some actions (“prompt”, “getdata”, and so on…). Of course, the  
URL “/customer/prompt” is associated to the action “prompt” and then  
to the view “prompt.rhtml”, but is it possible, when the URL is  
“/customer/getdata”, to associate the action “getdata”  
with the view “prompt.rhtml”? If so, how can I do this?

It should be like this: getdata (action) -\> prompt.rhtml (view)…

Tanks,  
Matthew

---

<div class="post-metadata">

**Author:** ![fixxxer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ea666f/32.png) [@fixxxer](https://www.ruby-forum.com/u/fixxxer)\
**Post date:** [November 19, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/one-view-many-actions/120694/2 "2007-11-19T22:08:31Z")

</div>

On 19 Nov 2007, at 20:47, Matteo Fil wrote:

> Hi all,  
> I’ve got a view named “prompt.rhtml” and a controller named “customer”  
> with some actions (“prompt”, “getdata”, and so on…). Of course, the  
> URL “/customer/prompt” is associated to the action “prompt” and then  
> to the view “prompt.rhtml”, but is it possible, when the URL is  
> “/customer/getdata”, to associate the action “getdata”  
> with the view “prompt.rhtml”? If so, how can I do this?

render :action =\> ‘foo’  
Will use the template for the foo action

Fred
